[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 363
  • Last Modified:

I am 'webifying' an existing Notes application, but I'm finding my browser (IE7) keeps caching old copies of pages - how can I stop this from happening?

I have provided limited access to an existing Notes application for web users, but am finding that my browser, which is IE7, seems to cache the pages so that, for example, if you create a new Document, then click on a link to a View that displays that Document, it doesn't display unless you press F5. This is especially annoying as I've used frames, so pressing F5 actually goes back to the initial frameset. So instead you must right-click the frame in which the document is displayed, & click on the Refresh item in the pop-up menu.

I've just carried out a quick search on Google & EE and was a bit surprised to see so many pages explaining different methods to do this, along with comments that most of them don't work! Having said that, a fairly simple solution will work in this case, & if necessary, it could apply to all pages within the site - if the odd static page had to be reloaded each time, then that wouldn't be a major problem.

So has anyone got a solution for me?
0
PaulCutcliffe
Asked:
PaulCutcliffe
1 Solution
 
madheeswarCommented:
Keep below in HTML Head Content form event
"<META http-equiv=\"expires\" content=\"no-cache\">"
0
 
PaulCutcliffeAuthor Commented:
Excellent, thanks - that sounds exactly what I was looking for.

Someone else has suggested adding this:

@SetHTTPHeader("Cache-control";"no-cache")

Is that functionally equivalent?
0
 
Bill-HansonCommented:
I've heard that every browser uses a different method, and that there is no method that works for every browser.  I use the two methods below which handles IE and Firefox.  The only true solution that I know of is to turn page caching off in the browser (company policy).

"<META HTTP-EQUIV=\"expires\" CONTENT=\"0\">" +@NewLine +
"<META HTTP-EQUIV=\"pragma\" CONTENT=\"NO-CACHE\">"
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
PaulCutcliffeAuthor Commented:
Thanks Bill-Hanson. Apparently (& according to http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllThreadedweb/7a36f0b1b817ffe285257370003cbf39?OpenDocument), madheeswar's advice is not quite right, as the no-cache content goes with the pragma meta tag, & the expires content requires a number.

Also there's the @SetHTTPHeader command too, which is better as proxy servers will read it, unlike any meta tags in the HTML.

So my final solution is this, in the HTMLHead field:

@SetHTTPHeader("Cache-control"; "no-cache");
"<META HTTP-EQUIV=\"expires\" CONTENT=\"0\">" +@NewLine +
"<META HTTP-EQUIV=\"pragma\" CONTENT=\"NO-CACHE\">"

Thanks for all your help.
0
 
qwaleteeCommented:
Make sure you also put that in your view template(s), or your views may get cached, not showing user's posts.
0
 
PaulCutcliffeAuthor Commented:
qwaletee, that was my intial issue that caused this whole thing - add a new document, then return to the view, only to see it was it was before!

I've added it to all the forms that will be used by the web users, including the ViewTemplate ones.

Thanks.
0
 
qwaleteeCommented:
No, not me.
0
 
PaulCutcliffeAuthor Commented:
Sorry Bill-Hanson, I seem to have forgotten to Accept your solution & allocate the points - all done now.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now