Thread: cache issue

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    North Dakota
    Posts
    53
    Rep Power
    17

    cache issue


    I have a series of forms, in a wizard type layout, for my users to fill out. There are 7 forms total. I would like the first 4 pages to not cache, the 5th page to cache and the last two page to not cache. Any suggestions???
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    28
    What scripting languages are you running?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    North Dakota
    Posts
    53
    Rep Power
    17
    I am using asp pages with javascipt. I would prefer a javascript solution, if possible.
  6. #4
  7. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    28
    Here's a good resource for ASP:

    http://www.learnasp.com/learn/cachenomore.asp

    Also check out:
    http://support.microsoft.com/support.../Q222/0/64.ASP

    ...about how IE does things a little quirkily.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    North Dakota
    Posts
    53
    Rep Power
    17
    ok so if I use:

    <%
    Response.Expires = 60
    Response.Expiresabsolute = Now() - 1
    Response.AddHeader "pragma","no-cache"
    Response.AddHeader "cache-control","private"
    Response.CacheControl = "no-cache"
    %>

    in the top of the pages I want NOT to cache, what do I change these setting to for the page that I want to cache??

    I tried this and it didn't work.
    <%
    Response.Expires = 0
    Response.Expiresabsolute = Now() + 1
    Response.AddHeader "pragma","cache"
    Response.AddHeader "cache-control","public"
    Response.CacheControl = "cache"
    %>
  10. #6
  11. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    28
    You'll kick yourself, but the answer to how to have the pages cached that you want cached is to simply omit the bit that says not to cache them. The browsers by default cache the pages so you don't have to do anything to cache them.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    North Dakota
    Posts
    53
    Rep Power
    17
    well that's just too easy. I never thought of that. Thank you for your help. It works great.

IMN logo majestic logo threadwatch logo seochat tools logo