INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

ASP wont expire

ASP wont expire

(OP)
Hello everyone

I have a challenge with my ASP page I cannot get it to expire. I have tried and added several lines of code including pragma statements and Expire.Absolute as well as setting the expire setting to -2000 - no change. I have waited for quite some time and still no expire. Currently it look like this

option explicit
Response.Expires = -2000
Response.cacheControl="no cache"
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"



Server.ScriptTimeout = 600
' All communication must be in UTF-8, including the response back from the request
Session.CodePage = 65001

RE: ASP wont expire

response.expires has to be a POSITIVE value in minutes.

Negative values means NO cache expiry is set. meaning never expire.

Expire.Absolute? there is no such object OR property.

Response.ExpiresAbsolute which takes a date and time as the value does.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: ASP wont expire

(OP)
Chris - thanks I will try it - and FYI this is taken directly for MSDN


you can use a negative number for the Expires property to expire the response immediately, as shown in the following code:
<%Response.Expires = -1 %>

RE: ASP wont expire

(OP)
Chris I set the HTTP Headers to expire in 1 minute and matched that to the setting on the asp page as follows:

<% Response.ExpiresAbsolute = #May 31,2010 13:30:15# %>

I then restarted the dedicated server

No change

I also tried <% Response.ExpiresAbsolute = Now() %>
No change


Incidentally running 2003 svr with IIS 6.0

RE: ASP wont expire

(OP)
Update

Ok guys


I have tried everything I have even set the asp page to session.abandon at the very top. I have set the expire setting in IIS to expire immediately. I have reset the website and stopped cleared and restarted firefox and it still wont expire the page.

I have also restarted the entire dedicated svr – no change. Any ideas…

RE: ASP wont expire


Are you sure Firefox doesn't have a Session Manager add-on installed which restores sessions?


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach

RE: ASP wont expire

(OP)
Mark

If that's true is there anyway to pragmatically bypass this from the ASP perspective?

RE: ASP wont expire



Here's a link that has some information on the subject. There is a tidbit about enabling cache expiration in IIS itself:

Quote:

To specify headers for an area of a site, select it in the Administration Tools interface, and bring up its properties. After selecting the HTTP Headers tab, you should see two interesting areas; Enable Content Expiration and Custom HTTP headers. The first should be self-explanatory, and the second can be used to apply Cache-Control headers.


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach

RE: ASP wont expire

(OP)
Thanks Mark

I tried several adjustments on the Headers In IIS earlier to no avail. I wonder if it has something to do with flash being embedded in the asp file...??

RE: ASP wont expire


I don't work with Flash, so I couldn't tell you. Without knowing the circumstances and issue you are trying to solve, it's hard to suggest a work around as well.


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close