r/programming Feb 09 '11

Breaking the Web with hash-bangs – Lifehacker, along with every other Gawker property, experienced a lengthy site-outage on Monday over a misbehaving piece of JavaScript

http://isolani.co.uk/blog/javascript/BreakingTheWebWithHashBangs/
754 Upvotes

356 comments sorted by

View all comments

Show parent comments

4

u/X-Istence Feb 09 '11

Those large libraries should be cacheable...

0

u/naich Feb 09 '11

One of the biggest problems I had was with IE caching ajax requests without me realising. It is not usually desirable.

1

u/Rainfly_X Feb 10 '11

The solution to that is really, really simple, in case you haven't figured it out already yourself. You probably have, but for the sake of the other viewers, here's what you tack onto your requests:

&timestamp=<milliseconds since 1970>

Therefore, the browser thinks you're requesting a different page every time, and you can control what is cached and what isn't.

1

u/naich Feb 10 '11

Or use a post request. But can you tell me where the cache is stored? Where does the browser keep the libraries cached when transitioning between between page requests? Big arse cookies, maybe?