Is there a way to clear my page’s user browser or say that I don’t need to use the cache?

Is there a command in classic ASP that I can use to tell the browser not to pull the page out of the cache or not to cache or clear my page’s cache?

+4
source share
7 answers

You can use HTML meta tags:

<meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="Fri, 01 Jan 1999 1:00:00 GMT" /> <meta http-equiv="Last-Modified" content="0" /> <meta http-equiv="Cache-Control" content="no-cache, must-revalidate" /> 

Or you can use ASP response headers:

 <% Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "no-cache" Response.Expires = -1 %> 
+9
source

Here is a good article on how to do this in browsers.

http://www.htmlgoodies.com/beyond/reference/article.php/3472881

+2
source

Not related to asp, this is an HTTP issue. You do this by modifying some aspects of http caching such as Cache-Control, etag, Expires, etc. Read RFC2616 , especially HTTP Caching, and set the appropriate header.

+2
source

Ignore anyone who tells you to use <meta> or Pragma elements. They are very unreliable. You need to set the appropriate HTTP headers. A good tutorial on how to decide which HTTP headers is right for you is available here . Cache-Control: no-cache is probably all you need, but read the tutorial as there are many project-specific reasons why you might need something else.

+2
source

If you put

 Response.Expires = -1 

in your classic ASP page, it will instruct the browser not to cache the content. If the user clicks "back" or goes to the page in another way, the browser will refresh the page from the server.

0
source

You can do this by making sure that you have the correct values ​​set for Reponse.cachecontrol, response.expires, etc. according to your needs. This link may be helpful in understanding what they mean. http://aspjavascript.com/lesson07.asp

-1
source

Because different browsers handle caching, you must use the Expires and no-cache commands. Here is an article showing the correct way to do this.

-2
source

Source: https://habr.com/ru/post/1277025/


All Articles