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.

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.


4 Responses to Httpservice not refreshing : Cache control problem

  1. 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.


  2. kumargandhi says:

    Thanks for sharing that info.


  3. lucadima says:

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

    Thank you Kumar for your solution!

  4. Kannan says:

    Simple code.. Works fine..
    I have wasted almost 2 hours to find this.. i was blaming to FLEX 😉 for this.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: