Httpservice not refreshing : Cache control problem

The main point here is the Browser, Mozilla works, its creates new sessions and no cache problem, but when it comes to IE this problem persists, so simple solution is that we have to manually create sessions each time the script runs, and this is done by simply adding two lines of code in every PHP script page and those lines are given below.

<?php
session_start();
header(“Cache-control: private”);
?>

It will create a new session each time the script runs. Even when this won’t work put “no-store” in place of “private” in the header.Problem solved i guess.

Leave any comments for suggestions.

3 Responses to “Httpservice not refreshing : Cache control problem”

  1. ABC Alessandro Says:

    You can also use:

    header(“Cache-Control: no-cache, must-revalidate”);
    header(“Expires: Mon, 26 Jul 1997 05:00:00 GMT”);

    It’s better, faster and it’doesn’t make any changes in your pre-dclarated variable session.

    Ciao

  2. kumargandhi Says:

    Hi,
    Thanks for sharing that info.

    regards,
    kumar.

  3. lucadima Says:

    The solution posted by ABC Alessandro doesn’t work for me….

    Thank you Kumar for your solution!

Leave a Reply