I made a method to show a loading indicator at the bottom of the page when a link is clicked.
When someone hits the back button, it doesn't refresh the page content of course thus showing the loading area.
Is there a way to detect whether the page came from a redirection to fire a method to remove the loading indicator?
Kinda like so:
function cameFromeBackButton(){
//hide loading indicator
}
OR is it a way to stop the back button and fire a method instead? like so:
function backButtonClicked(){
//do stuff instead of going back
}
EDIT: This is pretty much how the area is being called
$('.link').click(function(){
//make loading area
$('container').append(loadingAreaString)
//grab the href and goto page
window.location.href = $(this).attr('href');
return false
})