Scroll To Top

Enter a query to search our site. Note that you can use "*" and "?" as wildcards. Enclosing more than one word in double quotes ("CSS Layout") will search for the exact phrase.

PVII Knowledge Base

1. Select a product ...
2. Select category ...
3. Search the Knowledge Base...

Question #212

When viewing an Image Gallery Magic page in Safari or Firefox, if I click my back button then later use my forward button to return, the gallery does not work properly unless I reload the page. What's happening?

The Answer

Prepared Jul. 2007 by Al Sparber, PVII

Shortcuts taken by Apple and Mozilla to make their browsers seem faster than they really are can cause problems with script initialization when the back button is used. To work around this shortcoming, place the following script in affected pages or at the bottom of any external script file you have attached to your page.

1. Insert script in page head, inside script tags

<script type="text/javascript">
<!--
if(window.addEventListener){window.addEventListener("unload",P7_SFfix,false);}
function P7_SFfix(){return;}
//-->
</script>

2. Insert script inside existing external script file

if(window.addEventListener){window.addEventListener("unload",P7_SFfix,false);}
function P7_SFfix(){return;}

Back to the questions list