API
@-Formulas
JavaScript
LotusScript
Reg Exp
Web Design
Notes Client
XPages
 
Prevent Pages From Caching
To prevent web pages from caching in all browsers, put the following bit of code into a $$HTMLHead field or into your HTML Head Content section of the form:

"<META HTTP-EQUIV=\"expires\" CONTENT=\"0\">"

Note: Internet Explorer (IE) doesn't always recognize that tag. So, for IE, you should also put this into the $$HTMLHead field or HTML Head Content section:

"<META HTTP-EQUIV=\"pragma\" CONTENT=\"NO-CACHE\">"

Note: Even this is not very reliable on IE (it works some of the time). A better solution (but still not one that works 100% of the time in IE) would be to put that same line at the bottom of your form, so it is part of the <BODY> tag:

<BODY> <-- Domino should generate this tag -->
... Have the contents of your form here, then put...
"<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">"
</BODY> <-- Domino should generate this tag -->

Although still not 100% reliable in IE, it seems to do a pretty good job of preventing the browser from caching pages.

To be 100% guaranteed of going back to get a fresh copy, enter in a unique URL by putting in &junk at the end of your URL, where "junk" is any string of letters and numbers. You can change the string each time to provide a unique URL, which will make sure a cached version of the page is not loaded.

Note: The web page you are loading should anticipate this possibility and not make any assumptions about the contents of Query_String or Path_Info.