|
-
Feb 15th, 2001, 07:55 AM
#3
Fanatic Member
From MSDN:
Expires
The Expires property specifies the length of time before a page cached on a browser expires. If the user returns to the same page before it expires, the cached version is displayed.
Syntax
Response.Expires [= number]
Parameters
number
The time in minutes before the page expires.
Remarks
When your .asp file calls Response.Expires, IIS creates an HTTP header indicating the time on the server. If the system time on the client is earlier than the system time on the server (due to either the client or server having an inaccurate time setting, or time-zone differences) setting the parameter to 0 will not have the effect of expiring the page immediately. You can use the Response.ExpiresAbsolute property to achieve immediate expiration of a page. In addition, you can use a negative number for the Expires property. For example
<%Response.Expires = -1 %>
will expire the response immediately.
If there are multiple calls to Response.Expires on a single page, the server will use the shortest time period.
Therefore, if you don't want to cache any pages do something like this:
Code:
<%
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|