Results 1 to 2 of 2

Thread: Stopping ASP Pages from being cached.

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2001
    Location
    Baton Rouge, Louisiana
    Posts
    1

    Stopping ASP Pages from being cached.

    I know that you are supposed to set the the Response.Expires option to 0 if you want your ASP page to never be cached. But, I am still having problems with my pages being cached if the Browser is not set to check for newer version every time I visit the page. If it is set to Automatic or every time the browser starts, the pages still get cached.

    I have a single include file that I #include in all of my scripts. I call it global.asp. It in turn #includes all of my library files that my scripts need. So in my situation, all of my pages are dynamic and are read from the database, I simply placed the Response.Expires = 0 in the top of my global.asp file that I then include in all of my scripts. But this doesn't seem to be working all of the time. Am I missing something? Any help is appreciated!

    RaeRae1616

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    I use a bigger (smaller) number, like -30. That sets it to expires 30 minutes ago server time. If you set it to 0, it expires at the current time of the server. If the time on the client differs from the time on server, one minute ago on the server could be say, five minutes into the future on the client, so the page hasn't expired yet from the client's point of view.

    I hope that made sense. I had a problem where one of user's computers had a dead battery, so everytime the computer booted the date was like 1987, so pages that weren't supposed to be cached weren't expiring becuase the date on the client was 14 years ago!
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

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