I have some javascript which is being executed when the page is loaded. When a visitor proceeds to the next page and clicks on the “Back” button of his browser I do not want the javascript to be triggered again.
The javascript hides some div’s.
Here’s the code:
$(document).ready(function() {
some code
});
This link about controlling Back button events with Javascript has a few solutions to detect the event, such as setting a slightly different URL (one with a parameter that your onload script can read.