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
Lotus Notes and Domino 6 Programming Bible by Brian Benz, Rocky Oliver
Covers all the programming techniques, concepts, and languages used with Notes and Domino, as well as the many new features of Domino 6 Thoroughly examines the Notes and Domino role with Java, XML, Web services, and other IBM products and technologies Provides extensive code and examples, many geared to the needs of administrators High-profile authors, known to their audience through conferences and articles Companion Web site shows example applications from the book running on a live Domino server and provides code download.
See at: Amazon.co.uk | Amazon.com |