Skip to content Skip to sidebar Skip to footer

In Which Case Webpage Loads Without External Stylesheet In Chrome Or Safari?

In which case webpage loads without external stylesheet in chrome or safari ? I am talking about a case in which webbrowser first loads webpage without stylesheet and then redraw i

Solution 1:

I believe that this is always the case. In other words, CSS files are always loaded asynchronously, and when they become available they are stored in the broser and applied to the existing DOM.

If you are interested in slow loading files, you can simulate this and see how your browser behaves. Best way is the following: get yourself a php and apache installation (say XAMPP), instruct Apache to handle .css files as php files (i.e. execute php code in css files), create a new css file and at its to add <? sleep(20); ?>. This will cause the css file to be delayed by 20 seconds, effectively simulating the slowloading.

Other than that, you could also wish to load a CSS file after the page is already loaded. Here you can find an example: http://www.cssnewbie.com/simple-jquery-stylesheet-switcher/

Post a Comment for "In Which Case Webpage Loads Without External Stylesheet In Chrome Or Safari?"