Cache vs no Cache

J

Jawahar Rajan

All
I have the following code in my ASP Pages. These are the
first lines of Code in most of my pages.

'Ensure only 20 minute caching
Response.Expires = 1200
Response.buffer = True
Response.CacheControl = "no-cache"
Response.addHeader "pragma","no-cache"
Response.addHeader "cache-control","private"

Have I understood this correctly. The page will expire in
20 Minutes (20 * 60 = 1200), but the server will not cache
the page. however within a given 20 minute period user can
use the back button and they should not get a
Warning "Page has expired Message"

I want to keep the session at 20 minutes hence the 20
minute page expiration. but I Do not want to cache the
page on the server. Is this the correct approach. Or do
Ihave to specify a time for the Server Cache as well.

And Do I need both these lines?
As one is a page header does this apply to the Client only?

Response.CacheControl = "no-cache"
Response.addHeader "pragma","no-cache"

or can I leave the Cache part out completely as after 20
minutes the request must be made again.

Any help or suggestiona are always appreciated.
Jawahar
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top