SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2010
    0 Post(s)
    0 Thread(s)

    ASP Page caching issue (IE8)

    Hey everyone,

    --BACK STORY--

    I have a page with a calendar that's generated by javascript and populated with activities by ajax.

    On this page I also have the main navigation embedded as an include file.

    Within this navigation I can select a user and bring up their activities on the calendar. The user link goes off to a 'handler.asp' page, creates a session with that users ID, then goes back to the calendar page.

    When the page loads an ajax call is made to an XML page using that users ID stored in the session to populate the activity list. Then ajax parses the XML and loads it into the calendar.


    When using IE8, under Tools > Internet Options > General (Browsing History) > Settings if the "Check for newer versions..." is set to automatic, it will cache the calendar activities. In other words, I can click any user in the nav list I want but it will always show the activities of the first user.

    If I set the browser's "Check for newer versions..." to "Every time I visit the page" there's no caching and everything works as expected.

    The problem is that I can't ask every single person using this website to change their browser settings if they want the calendar to work properly.

    I've tried adding this to the top of my ASP pages:

    Code ASP:
    Response.CacheControl = "no-cache"
    Response.AddHeader "Pragma", "no-cache"
    Response.Expires = -1

    I've also tried manually setting the meta tags "Pragma" and "Expires"

    Nothing seems to work. Any suggestions?

  2. #2
    SitePoint Enthusiast
    Join Date
    Aug 2011
    OH, USA
    0 Post(s)
    0 Thread(s)
    Try that
    Response.Expires = 0
    Response.Expiresabsolute = Now() - 1 
    Response.AddHeader "pragma","no-cache" 
    Response.AddHeader "cache-control","private" 
    Response.CacheControl = "no-cache"

Tags for this Thread


Posting Permissions

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