Search code examples
javascriptgoogle-chromepage-refresh

Force Google Chrome to display blank page on reload


I see if we reload page in IE/Edge or Chrome/Firefox there is a big difference. IE/Edge cleans the page and shows white page but Chrome/Firefox does not.

Is it possible somehow using JavaScript to say Chrome/Firefox like hey, please show me the blank page instead of the current page?

Thank you!


Solution

  • I found how to do it.

      window.onbeforeunload = function (e) {
            $("html,body").hide();        
        };