Reload Hype Document when using the back button in Safari

If you return to a Tumult Hype document by using the back button in Safari, your document will sometimes remain in the condition you left it: it will likely be on the same scene and timeline state. Want to avoid this?

Add the following to the ‘head’ of your document. You can edit the contents of the <head>…</head> of your exported .html file by clicking on ‘Edit HTML Head’ in the Document Inspector.

<script type="text/javascript">
window.onpageshow = function(event) {
    if (event.persisted) {
        // or: 
        HYPE.documents['documentName'].showSceneNamed('Scene 1',HYPE.documents['documentName'].kSceneTransitionInstant); 

More info here: