javascript - Detect whether a page is entered through history.back -


when return previous page through history.back(), page not newly loaded. instead, displayed left. efficient , avoids dribbling in of images.

however, want run function when page entered via history.back() synchronise page calling history.back(). there event firing in called page when entered in way [i.e. history.back()]?

note: have hack using setinterval polls re-entry, think ugly. tried popstate did not fire.

you can use

https://github.com/browserstate/history.js/

especially

history.adapter.bind(window,'statechange',function() 

it fires on every state change ('back' well).


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -