Results 1 to 2 of 2

Thread: setting no cache

  1. #1

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    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.

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width