开发者

Prevent IE from storing/caching URL shortcuts

It seems that a shortcut with the destination of the invoking URL is created (cached) in 'Temporary Internet Files' under the user's profile 开发者_运维百科on the local desktop machine.

How can one prevent IE from doing so? It would be even great if it can be somehow controlled by the hosted page itself (may be some tags in the HTML), rather than users having to configure their IE setup.


You could prevent it from caching by putting this HTML in your <head> tags:

<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />

Keep in mind that this wont always prevent it from caching but usually does.

You could also use PHP if you wanted, by putting this at the very top of your PHP page (if it's PHP) before the opening <html> tag:

<?php
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>

FYI: Cache = Temporary Internet Files (if you didn't know)

Hope this helps.


Edit:

So you are using JSP? Please see this page: http://www.rgagnon.com/javadetails/java-0590.html I hope this solves your problem. :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜