开发者

Resolving Webpage expired in IE8

Whenever i click on File->New Window or press ctrl+n in IE8, I get a new window with a page which is displayed from browsers cachec and request does not go to server side.

I solved the above issue by adding following lines in each page,

response.setHeader("Cache-Control","no-cache");

response.setHeader("Pragma","no-cache");

response.setDateHeader ("Expires", 0);

response.setHeader("Cache-Control","no-store");

Now when i click on File->New Window or press ctrl+n in IE8, I get a msg "Webpage has been expired.........Local Copy............." in new window.

Instead of displaying above msg i need to display my own msg/page.

I have tried different values in response header for Cache-Control, Expire etc.

The only thing i want to achieve is that, if there is no page in cache then the request must go to server for processing i.e. whenever user clicks on file->开发者_Python百科new window or ctrl+n in IE8 the request should go to server.


I'm fairly sure the only way to achieve this is if the user disables their own cache, then every request will re-hit the server.

edit: No even that won't work... because when your browser crashes and tries to reload your tabs on startup, it won't hit the server for those either, even if your cache is disabled...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜