Skip to content
This repository has been archived by the owner on Jul 21, 2019. It is now read-only.

speed up cache clearing for twitter cards #477

Open
bridgetkromhout opened this issue Apr 10, 2017 · 7 comments
Open

speed up cache clearing for twitter cards #477

bridgetkromhout opened this issue Apr 10, 2017 · 7 comments
Milestone

Comments

@bridgetkromhout
Copy link
Contributor

Expected behavior

It would be nice if changes to the welcome page description such as in https://github.com/devopsdays/devopsdays-web/pull/2260/files would show up right away.

Actual behavior

Twitter caches the old data for up to a week. See https://dev.twitter.com/cards/troubleshooting#refreshing

screen shot 2017-04-10 at 9 22 42 am

Reproduction Steps

Make a change to the index page description and then tweet the link. Observe that the page content that's tweeted doesn't change.

@mattstratton
Copy link
Member

So one thing that I think would help, possibly, is if we fingerprint the sharing image. Right now that image doesn't get fingerprinted, which means that twitter probably thinks it never changes.

The other thing is, as mentioned, you end up putting in some kind of fake querystring when tweeting the link. TBH I don't really know if there's anything we can do about it in the CODE...it's more something that someone needs to do if they change their stuff.

@mattstratton mattstratton modified the milestone: Blue Sky May 11, 2017
@bridgetkromhout
Copy link
Contributor Author

if we fingerprint the sharing image

By this, do you mean "tell people to add a timestamp manually"?

@mattstratton
Copy link
Member

Nope. It's something we would have to do in the code - it's the thing that lets you set super long caches on images, etc, because you do cache-busting on the images so their URL changes on each build. Anyway, when I said "fingerprint the sharing image", that's what I was referring to. So the image would be something like devopsdays.org/events/2017-ponyville/sharing123312613265.jpg instead of devopsdays.org/events/2017-ponyville/sharing.jpg.

Fundamentally, I don't think there's anything we can do about it. The annoying thing is that Twitter doesn't have a cache cleaner/debugger like Facebook does (you can force Facebook to clear their OG cache for a URL and fetch new images, etc, if you know you've changed something).

I would put this as of dubious value as we'd end up messing about with builds and caches and it could cause other issues.

@bridgetkromhout
Copy link
Contributor Author

Okay, here's a thought: is there a usable "preview how this will look when/if you tweet it" we could point people to (or build locally)? That way they'd at least have a shot at finding glaring errors before they tragically exist for a week.

@mattstratton
Copy link
Member

Well, if they’ve over-ridden it, it’s the image they put in themselves.

We could probably document what the url of the image would be, to make it easier to preview.

@mattstratton
Copy link
Member

Oh, this isn’t even about the image. This was about the description.

There’s not really anything we can do short of giving some web dev tips on maybe browser extensions that will show you what social tags look like?

@bridgetkromhout
Copy link
Contributor Author

Yeah, maybe a browser extension recommendation would be good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants