It is a well known problem that IE caches too much of html, even when giving a Cache-Control: no-cache
or Last-Modified
header to everypage.
This behaiviour is really troubling when working with querystrings to get dynamic information, as IE considers it to be the same page (i.e.: http://example.com/?id=10
) and serves the cached version.
I've solved it adding either a random number or a timestring to the querystring (as others have done) like this http://example.com/?id=10&t=2009-08-06_13:12:56
that I just ignore serverside.
Is there a better option? Is there another, cleaner way to acomplish this? I'm aware that POST
isn't cached, but it is semanticaly correct to use GET
here.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…