Prevent Refresh - sounds like an FAQ

A

Aaron Fude

I use JSP and I have a page with takes 10 seconds to generate at the server
end..
If you user goes past it and then hits the "Back" button, the report is
regenerated. But, of course, I want the cached version displayed to save the
10 second wait.

What controls whether the page is refreshed or cached? How can you force it
to cache and not refresh?

Thank you,

Aaron Fude
 
S

Steve Pugh

Aaron Fude said:
I use JSP and I have a page with takes 10 seconds to generate at the server
end..

Ouch. It had better be something the user really needs...
If you user goes past it and then hits the "Back" button, the report is
regenerated. But, of course, I want the cached version displayed to save the
10 second wait.

What controls whether the page is refreshed or cached? How can you force it
to cache and not refresh?

Read http://www.mnot.net/cache_docs/ and learn how caching works. In
particular the section on writing cache aware scripts
http://www.mnot.net/cache_docs/#SCRIPT

Check the cachability of your pages with
http://www.ircache.net/cgi-bin/cacheability.py

Of course the best solution would also involve eliminating that 10
second generation time.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top