Hacker News new | ask | show | jobs
by ceejayoz 5212 days ago
I'd imagine Twitter's serving `Cache-Control: public` where appropriate.
1 comments

You would think but sadly, no.

They serve the actual tweet as "Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0"

https://pastee.org/bzeb5

EDIT: Just to check, I also looked at one of their css resources. https://si0.twimg.com/a/1330626450/t1/css/t1_core_logged_out...

Cache-Control: private, max-age=31449600

So I'm not confident Twitter actually understands how to set things.

PS: Hey Twitter, I can help =)

Maybe it's just that they don't want that one page cached as they may update their scripts, images and stylesheets. And for that css-file, I think that whenever they change the css, they'll just give the resource a new address so cache is only invalidated when there are actual changes.
That does not make sense. If they update that page, then it'll get refreshed when it expires.

For the CSS file, some browsers are buggy so it really should be set to "Cache-Control: public".

See http://www.acunote.com/blog/2008/07/why-you-should-use-cache...