SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict mr cgi guy's Avatar
    Join Date
    Mar 2003
    Location
    Aurora, IL
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Force a page to expire

    Hey, this is a shot in the dark, anyone have any idea how to force a dynamic CGI generated page to expire?

    I've got a credit card payment form, and I want to prevent people from clicking on the back button and seeing the credit card info again... I've done EVERYTHING to prevent this caching, but nothing works. I've tried all the cache preventing meta tags to no avail. I've set the headers created by the CGI.pm with an expires parameter, didn't work. I've created plain Perl header with an expires setting, didn't work. Nothing I do forces the page to expire. No matter what I do, I can always hit the back button and see the credit card info.

    I know it's not my browser because PayPal is able to do it. I checked their source code and I don't see anything there that suggests how they do it. Anyone have any ideas??

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    See the Caching tutorial for web authors and webmasters for a good introduction to caching.

    The only setting I've found that prevents all caching is Cache-Control:no-store. And even then Opera will show it if you use the Back button, due to its advanced memory cache.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Addict mr cgi guy's Avatar
    Join Date
    Mar 2003
    Location
    Aurora, IL
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I ended up just settling on some javascript that forces you forward if you try and go back. Does the job.


Bookmarks

Posting Permissions

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