Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flicker in IE11 on page load, but not in developer mode

I'm getting flicker on page load or postback of a coloured page body in IE11, on externally hosted site (ie. not from local disk).

The odd thing is it goes away if I either:

  1. Open F12 developer tools
  2. Add the site to trusted sites
  3. Add the site to restricted sites

I've got a VM with IE9 which works fine. Works fine on Chrome.

I obviously cannot use any of the above as a solution!!!

This sample code has one link that switches between two pages. I've removed everything else, javascript, css files etc.

--- page1.html ---

<html>

<body style="background-color:#000000">
    <a href="page2.html">Page 2</a>
</body>

</html>

And then an identical page2.html that refs back to page 1.

Clicking on the link flickers the background from white to black each time, unless using any of the "fixes" above!

like image 230
peter_g Avatar asked Jun 03 '14 08:06

peter_g


1 Answers

I have found another way to temporary fix this bug by adding an empty event handler through JS.

link such .js file to you html

fix_ie.js:

if(window.addEventListener){
    window.addEventListener('beforeunload', function(){});
}
like image 163
Hellbyte Avatar answered Oct 11 '22 16:10

Hellbyte