#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Bookham, Surrey, UK
    Posts
    4
    Rep Power
    0
    Hi

    When my perl script is called from a web page it creates a text file then outputs the results to the client's browser using

    print <<'end_print_tag';
    <html>
    . . .
    </html>

    This works fine, but if you then refresh the results page you just get the raw HTML
    <html>
    . . .
    </html>

    Any pointers on how to stop this would be much appreciated.

    Mike
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    73
    Rep Power
    15
    Hi

    Can you post the code you are using?

    print <<'end_print_tag';
    <html>
    . . .
    </html>

    end_print_tag - have you put this bit in?

  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Bookham, Surrey, UK
    Posts
    4
    Rep Power
    0
    Hi

    >end_print_tag - have you put this bit in?
    Yes. The problem seems to have improved with a few changes to the server and by adding no cache meta tags to the page. However it still seems scary that this can happen.

    Regards Mike
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    452
    Rep Power
    14
    make sure the very first thing thats printed is the header...

    print "Content-type: text/htmlnn";
    print << end_print_tag;
    <HTML>
    ..
    </HTML>
    end_print_tag

IMN logo majestic logo threadwatch logo seochat tools logo