-
setting no cache
Hi I have a form, 3 pages in i submit data. On this page I have set no cache
Code:
<%
Response.ExpiresAbsolute = DateTime.Now
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.Buffer = True
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Cache.SetExpires(DateTime.UtcNow)
Response.Cache.SetNoStore()
Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches)
%>
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
after successfully submitting I create a session to say user has submitted and redirect to a summary.
Then in page load of submission I check to see this session exists and if so I forward to summary.
Now I submit, go to summary and press back. Submission loads from server and sees session exists and sends to summary. It works fine.
However when I press back again it ignores the submission and goes to the page before.
Can anyone help me with this or at least explain whats happening.
Thanks in advance.
-
Re: setting no cache
Hello,
Just to confirm, at you testing this out of Visual Studio using the built in web server, or out of IIS?
Gary