CGI and browser cahce

Discussion in 'Perl Misc' started by Sascha Möllering, Aug 6, 2003.

  1. Hi,

    I've a problem: I don't want the browser to cache websites, because I
    wrote a shop with authentification and after having logged out, it is
    possible to see the old sites using the back button of the browser. I
    tried the following (my header.cgi-file), but it does not work:

    print "Content-type: text/html\n\n";
    print <<EOF;
    <html>
    <head>
    <META http-equiv="Cache-Control" content="no-cache">
    <META http-equiv="Pragma" content="no-cache">
    <META http-equiv="Expires" content="-1">
    <link rel="stylesheet" type="text/css" href="/css/main.css">
    </head>
    <body>
    <table width="78%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="78%" align="left">
    EOF


    Any ideas?



    Thank you,

    Sascha
     
    Sascha Möllering, Aug 6, 2003
    #1
    1. Advertising

  2. "Sascha Möllering" <> wrote in message
    news:bgqpkv$mkv$04$-online.com...
    > Hi,
    >
    > I've a problem: I don't want the browser to cache websites, because I
    > wrote a shop with authentification and after having logged out, it is
    > possible to see the old sites using the back button of the browser. I
    > tried the following (my header.cgi-file), but it does not work:


    Your Perl question is answered in
    http://www.htmlgoodies.com/beyond/nocache.html

    gtoomey
     
    Gregory Toomey, Aug 6, 2003
    #2
    1. Advertising

  3. On Wed, Aug 6, Gregory Toomey inscribed on the eternal scroll:

    > > wrote a shop with authentification and after having logged out, it is
    > > possible to see the old sites using the back button of the browser. I
    > > tried the following (my header.cgi-file), but it does not work:

    >
    > Your Perl question


    I didn't see a Perl question - did you, or was that sarcasm?

    > is answered in
    > http://www.htmlgoodies.com/beyond/nocache.html


    I'm not sure whether you're deliberately punishing the questioner by
    citing a sub-quality answer to the off-topic question, but as soon as
    I saw the page recommending to write syntactically invalid HTML in
    order to compensate for bug(s) in a certain browser-like operating
    system component, I left.
     
    Alan J. Flavell, Aug 6, 2003
    #3
  4. On Wed, Aug 6, Sascha Möllering inscribed on the eternal scroll:

    > I've a problem:


    You have several! I think I'm going to start reading
    de.comp.lang.perl.cgi _before_ considering to answer any question seen
    here. Has it suddenly become infectious to post the same question
    (modulo the language) separately to both, without mentioning the fact?
    I am by no means the only person around here who reads German! At
    least it was vaguely on-topic there, which it really isn't here.

    good luck.
     
    Alan J. Flavell, Aug 6, 2003
    #4
  5. Sascha Möllering wrote:
    > I've a problem: I don't want the browser to cache websites, because I
    > wrote a shop with authentification and after having logged out, it is
    > possible to see the old sites using the back button of the browser. I
    > tried the following (my header.cgi-file), but it does not work:
    >
    > print "[print text snipped]";
    > print <<EOF;

    [print text snipped]
    > EOF


    On a first glimpse your Perl code looks fine (well, it's hardly possible to
    mess up two simple print statements anyway). You need to provide more
    details:
    - What do you expect Perl to print
    - What does Perl actually print on your computer
    Without this information we cannot know why the Perl code does not do what
    you expect it to do.

    jue
     
    Jürgen Exner, Aug 6, 2003
    #5
  6. Sascha Möllering <> wrote in news:bgqpkv$mkv$04$-
    online.com:

    > Hi,
    >
    > I've a problem:


    Your main problem is asking a question that has nothing to do with Perl. You
    should try comp.infosystems.www.authoring.cgi.

    By the way, there is also something called google, in case you have never
    heard of it. http://www.mnot.net/cache_docs/#CONTROL might be helpful.

    --
    A. Sinan Unur

    Remove dashes for address
    Spam bait: mailto:
     
    A. Sinan Unur, Aug 6, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jürgen Exner

    Re: CGI Perl "use CGI" statement fail

    Jürgen Exner, Jul 31, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,511
    Jürgen Exner
    Jul 31, 2003
  2. Shailan
    Replies:
    2
    Views:
    1,095
    Shailan
    Dec 15, 2003
  3. Michael Tissington

    How NOT to cahce downloads

    Michael Tissington, Dec 6, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    419
    Michael Tissington
    Dec 6, 2005
  4. Professor Chen
    Replies:
    0
    Views:
    230
    Professor Chen
    Feb 6, 2006
  5. zippy

    cgi and cgi-bin

    zippy, Feb 1, 2005, in forum: Perl Misc
    Replies:
    5
    Views:
    387
    Sam Holden
    Feb 2, 2005
Loading...

Share This Page