[thelist] Stylesheet switching Jitters

Sam Carter sam at iness.com
Tue Mar 8 08:53:12 CST 2005

I've got a client-side stylesheet switcher which uses a session cookie 
to remember which "alternate" stylesheet is currently active.

The alternate sheet is a black background/white text, and results in a 
white flash every time a new page is loaded (due to the slight delay it 
takes to execute the switching JavaScript).  Oddly, this flash only 
occurs when the new page has a graphic element.  It seems IE initiates 
the image loads before executing the JavaScript giving enough time for 
the white-background stylesheet to be applied for a brief moment.

This may be unavoidable, but I was wondering if others experience the 
same using client side stylesheet switching?  Is there a solution to 
prevent the display until the current stylesheet is applied?


More information about the thelist mailing list