How to make the indicator show more consistently on page exit
I'd like the progress indicator to show when a link is clicked and remain on until the new page appears.
To implement this I've tried:
window.onbeforeunload = function(e) { Pace.restart(); };
This turns the indicator on when a link is clicked but it only remains on a couple seconds. Is there a way to make it stay on longer until the new page is loaded?
Have you tried to use pace-options paceOptions={ghostTime: 800}? ghostTime should configure the minimum time the bar or percentage will sit at 100% before disappearing.
Thanks! Seems like this is the right avenue but I don't want to set it on page load or it will remain on too long. I just want it on page exit. I've tried the following code but it doesn't seem to work. Arg... I just want to turn it on and have it stay on! :)
window.onbeforeunload = function(e) { Pace.options = {ghostTime: 2500000}; Pace.restart(); };
We have the same issue pace stops before page unload, that cause confusion to users that might they have not clicked any link yet. Any other solution. ?
+1
+1
+1