I'm trying to check the cache configuration, I want my page to remain in the cache for 1 minute before the request reaches the server again.
Using this simple test.asp page that has a link to itself:
<% Option Explicit %> <% Response.Expires = 1 Response.CacheControl = "private, max-age=60" %> <html> <head><title>test</title></head> <body> <% =Now() %> <br /> <a href="test.asp">test</a> </body> </html>
This works fine on my development computer http: //localhost/test.asp (clicking the link does not update the print date within 1 minute).
However, it does not have the desired effect when I put the page on a production server. After a few seconds of clicking the link, I get a new datetime, meaning that the request has reached the web server.
I use the Chrome dev tool and see these response headers:
HTTP/1.1 200 OK Cache-Control: private, max-age=60 Content-Type: text/html Expires: Tue, 12 May 2015 19:16:52 GMT Last-Modified: Tue, 12 May 2015 19:10:00 GMT Server: Microsoft-IIS/7.5 X-Powered-By: ASP.NET Date: Tue, 12 May 2015 19:15:55 GMT Content-Length: 205
Can someone explain why it does not work on the prod server?
update I tried with Chrome, Firefox and IE, as well as 2 pages test.asp and test2.asp that have a link to another page, and got exactly the same problem, after 8-12 seconds the page was updated instead of waiting 60 seconds before refreshing .
Jonathan
source share