“Rocket Sauce”
Give your pages the illusion of speed by hiding content on the current page before the next page request comes through. Try running the snippet below from your console (works on this page).
window.onbeforeunload = function() {
// Alternately, set a class on a collection
// of elements that you wish to hide.
$('#clrpsa').css('opacity', 0);
// Use when navigating to pages with the same header
window.scroll(0, 0);
}
Written by Kevin Sweeney
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#User experience
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#