I use the jQuery BBQ: Back Button and Query Library plugin to create a page that pulls dynamic content when a link is clicked. When you click on the link, the hash changes and the new content is pulled (therefore, the "default" action of clicking on href is disabled.)
This part works very well, but there is a problem.
Example of my problem
Say that on the home page there is a DIV several images in it and a list of links ...
Images may take some time to download, in the meantime, the user often does not wait for them to fully download and click on the "First Page" link.
This clears the contents of the "home" page and loads into the "One Page" content. It works great.
The problem is that images from the homepage are still loading in the browser, even if the user has gone from the homepage.
I know this is due to the fact that the page has not actually changed, and I use the BBQ Plugin hashchange hack, but I want to know if there is a way in JavaScript to tell about all the currently loaded stop images in the hashchange event?
?? Sample code will look like ...
$(window).bind('hashchange', function () {
javascript jquery fragment-identifier hashchange browser-state
Justin Jenkins Jun 30 2018-10-10T00: 00Z
source share