By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,614 Members | 1,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,614 IT Pros & Developers. It's quick & easy.

annoying/odd IE behaviour with sessions

P: n/a
PI
Hi Guys,
I need some with this please.

I have a bit of code which stores user selections within a cart and
persists the cart using sessions. The user may at any time click a
button to view the contents of his/her cart. This functionality
behaves as expected with Mozilla Firefox, Opera, Safari and Chrome.
IE, IE 7 to be precise however will not show the current
status(content)of the cart until/unless the browser is manually
refreshed/reloaded. This occurs with other IE installations I have
checked so it's not specific to my machine (perhaps due to installed
plugins or updates). I have right here another reason why the world
should quit IE altogether but...

I need some help with this please. is there a hack to this? Perhaps
asking IE to autorefresh? Or a more elegant way of solving this
problem. Thanks.

Regards,
pi
Oct 1 '08 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Message-ID:
<dd**********************************@u65g2000hsc. googlegroups.comfrom
PI contained the following:
>The user may at any time click a
button to view the contents of his/her cart.
Does this involve a round trip to the server?
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
http://slipperyhill.co.uk - http://4theweb.co.uk
Oct 1 '08 #2

P: n/a
PI
On Oct 1, 10:06*am, Geoff Berrow <blthe...@ckdog.co.ukwrote:
Message-ID:
<dd13adf3-6464-4c91-9abc-28d82fe3e...@u65g2000hsc.googlegroups.comfrom
PI contained the following:
The user may at any time click a
button to view the contents of his/her cart.

Does this involve a round trip to the server?
--
Geoff Berrow *0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011http://slipperyhill.co.uk-http://4theweb.co.uk
Thanks Geoff,
it actually does a trip to the server to retrieve the current contents
of the cart - is there something I should look at a little more
closely? Thanks again
Oct 1 '08 #3

P: n/a
Message-ID:
<48**********************************@h60g2000hsg. googlegroups.comfrom
PI contained the following:
>Thanks Geoff,
it actually does a trip to the server to retrieve the current contents
of the cart - is there something I should look at a little more
closely?
Just wondered if it was a bit of Javascript that wasn't working in IE7.
Obviously not. Here are some things to try.

Make sure all your html is correct, and all form tags are correct etc
Validating the code may help.

Strip away all code to leave the bare minimum that still displays the
problem. This often identifies the problem

You could try adding a random query string to the URL eg

<form method='post' action = '<?php echo
$SERVER['PHP_SELF']."?t=".time(); ?'>

//cart refresh button etc

</form>
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
http://slipperyhill.co.uk - http://4theweb.co.uk
Oct 1 '08 #4

P: n/a
PI wrote:
Hi Guys,
I need some with this please.

I have a bit of code which stores user selections within a cart and
persists the cart using sessions. The user may at any time click a
button to view the contents of his/her cart. This functionality
behaves as expected with Mozilla Firefox, Opera, Safari and Chrome.
IE, IE 7 to be precise however will not show the current
status(content)of the cart until/unless the browser is manually
refreshed/reloaded. This occurs with other IE installations I have
checked so it's not specific to my machine (perhaps due to installed
plugins or updates). I have right here another reason why the world
should quit IE altogether but...

I need some help with this please. is there a hack to this? Perhaps
asking IE to autorefresh? Or a more elegant way of solving this
problem. Thanks.

Regards,
pi
I suspect IE 7 is caching the page. If that's the case, there isn't
much you can do from the PHP end. You could try alt.html for ways to
convince IE not to cache the pages.

Alternatively, you should be able to use AJAX to do the refreshing -
that would be comp.lang.javascript.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Oct 1 '08 #5

P: n/a
PI
On Oct 1, 11:51*am, Jerry Stuckle <jstuck...@attglobal.netwrote:
PI wrote:
Hi Guys,
I need some with this please.
I have a bit of code which stores user selections within a cart and
persists the cart using sessions. The user may at any time click a
button to view the contents of his/her cart. This functionality
behaves as expected with Mozilla Firefox, Opera, Safari and Chrome.
IE, IE 7 to be precise however will not show the current
status(content)of the cart until/unless the browser is manually
refreshed/reloaded. This occurs with other IE installations I have
checked so it's not specific to my machine (perhaps due to installed
plugins or updates). I have right here another reason why the world
should quit IE altogether but...
I need some help with this please. is there a hack to this? Perhaps
asking IE to autorefresh? Or a more elegant way of solving this
problem. Thanks.
Regards,
pi

I suspect IE 7 is caching the page. *If that's the case, there isn't
much you can do from the PHP end. *You could try alt.html for ways to
convince IE not to cache the pages.

Alternatively, you should be able to use AJAX to do the refreshing -
that would be comp.lang.javascript.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
Thanks Geoff/Jerry for your assistance, the problem persists; but I am
convinced that Jerry's suspicion of IE caching is the problem. I have
tried to cautiously tweak one or two runtime configuration relating to
sessions such as session.cache_expire and session.cache_limiter. This
has not worked. I have also tried using header statements such as
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') and header('Pragma:
no-cache') to force IE to 'forget'. This has not worked either. I also
tried putting it on the html head as in: <meta http-equiv="expires"
content="Mon, 26 Jul 1997 05:00:00 GMT"/ and it still won't work. IE
7 is so annoying that even when I put an echo statement on the code,
reload the browser to display the statement (and it does cos the page
was reloaded), I then removed the echo statement from the code, close
the browser altogether and restart it, the crazy thing still outputs
the 'non-existent' echo statement! What in the world can I do? My
Javascript is not up to speed, so AJAX? except you could show me some
nifty code that I could customize. Thanks a lot.
Oct 1 '08 #6

P: n/a
Message-ID:
<ef**********************************@m44g2000hsc. googlegroups.comfrom
PI contained the following:
>What in the world can I do?
Did you try my random query string idea?
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
http://slipperyhill.co.uk - http://4theweb.co.uk
Oct 1 '08 #7

P: n/a
PI
On Oct 1, 1:26*pm, Geoff Berrow <blthe...@ckdog.co.ukwrote:
Message-ID:
<ef461681-49dd-4e8a-9266-49bb4a52d...@m44g2000hsc.googlegroups.comfrom
PI contained the following:
What in the world can I do?

Did you try my random query string idea?
--
Geoff Berrow *0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011http://slipperyhill.co.uk-http://4theweb.co.uk
Hi Geoff,
thanks I finally got this issue sorted based on the information
available on http://support.microsoft.com/kb/234067
hope this helps someone.

Thanks
Oct 1 '08 #8

This discussion thread is closed

Replies have been disabled for this discussion.