Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
Allow back to search results without error

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#BackToSearchCache or http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/BackToSearchCache


I implemented a website with a search interface using the standard "viewname questionmark SearchView ampersand query equals"  url code. When a user clicked on a result and then clicked back on the browser to go back to the search results the error 'Warning: Page has Expired' came up . Turns out to be an easy fix.





 

This happens because the browser has not cached the page because the header has not instructed it to cache it. When &query is used the browser assumes the page has been created using a form post response and so by default prevents the page from being reopened as a security measure.

 

Putting this in the HTML Head Content event of the $$SearchTemplateDefault form:

"<META HTTP-EQUIV=\"Pragma\" CONTENT=\"cache\">"

allows users to go back in the browser without getting the error.

 

NB Alternatively to force the user to resubmit the search you can put in:

"<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">

but why would you want to do that ? : )

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
Web Services Platform Architecture: Soap, WSDL, WS-Policy, WS-Addressing, WS-Bpel, WS-Reliable Messaging and More by Francisco Curbera, Frank Leymann, Tony Storey, Donald Ferguson, Sanjiva Weerawarana
Other books claim to present the complete Web services platform architecture, but this is the first one I've seen that really does. The authors have been intimately involved in the creation of the architecture. Who better to write this book?
See at: Amazon.co.uk | Amazon.com |