[FX.php List] [OFF] Reload page in Safari after back button?
Joel Shapiro
jsfmp at earthlink.net
Thu Mar 1 13:45:40 MST 2012
Hi
I've thrown my test pages online:
http://jsfmp.com/safariBackButton/without_bodyunload.php
http://jsfmp.com/safariBackButton/with_bodyunload.php
The first one, with no extra code, works in all browsers except Safari.
The second one works in desktop Safari (Mac), but *not* on Mobile Safari (iOS). I haven't tried Windows Safari.
session_cache_limiter('private'); doesn't make a difference either
I haven't read through the webkit blog page yet. Gotta run now. More later… (?)
Thanks all,
-Joel
On Mar 1, 2012, at 12:29 PM, Andrew Denman wrote:
> I believe this article may explain what is happening and how to force a 'refresh' (either brute force or through javascript):
> http://www.webkit.org/blog/516/webkit-page-cache-ii-the-unload-event/
>
> Andrew Denman
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Joel Shapiro
> Sent: Thursday, March 01, 2012 12:57 PM
> To: FX.php Discussion List
> Subject: Re: [FX.php List] [OFF] Reload page in Safari after back button?
>
> Hi Denis
>
> Thanks, but that doesn't make any difference in Safari.
>
> Best,
> -Joel
>
>
> On Mar 1, 2012, at 7:52 AM, Denis Somar wrote:
>
>> I believe this has to do with browser caching. Try adding this to the header of your PHP and it should force it to reload:
>> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
>>
>> Cheers,
>> Denis
>>
>> On Wed, Feb 29, 2012 at 6:11 PM, Joel Shapiro <jsfmp at earthlink.net> wrote:
>> Hi all!
>>
>> Safari, as far as I know, is the only browser that doesn't
>> automatically reload a page after clicking the Back button. (e.g.:
>> Echo some $_SESSION vars on page1, update those vars on page2, then
>> click the Back button. In Safari, page1 still shows the original vars
>> until you click Reload. All other browsers show the updated vars as
>> soon as you click Back)
>>
>> I found one fix: "Setting onunload="" in the body-tag causes Safari to
>> invalidate the page and reload it upon window.history.back();", but I'm wondering how other people here deal with this.
>>
>> Thoughts?
>>
>> http://stackoverflow.com/questions/5297122/preventing-cache-on-back-bu
>> tton-in-safari-5/5305905#5305905
>>
>> Thanks,
>> -Joel_______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list