Jump to menu

Vote down?

  1. David Singleton

    There’s still a slight problem with the two methods mentioned above, they’re still going to fire once the DOM is loaded. If the page contains a large amount of content, or the user is on a slow connection than you can still have that flicker of non-js content while the page itself is loading (not external resources).

    That is a relatively niche case, but it means the method in this article is a little more robust. It’s the way I’ve been using this to handle the hiding/altering of elements for Javascript enabled browsers, although I’ve found it easier to use document.write to create a link to another specific CSS file, which keeps things a bit tidier.