DownLoad priority ?
-
Hi there guys. I have a CSS file and a HTML file (HTML created by smarty) I want to the css file load on browser earlier than HTML file. Can we do it ?
-
Hi there guys. I have a CSS file and a HTML file (HTML created by smarty) I want to the css file load on browser earlier than HTML file. Can we do it ?
-
Hi there guys. I have a CSS file and a HTML file (HTML created by smarty) I want to the css file load on browser earlier than HTML file. Can we do it ?
In order for the CSS file to load, it must be linked to (by an HTML file). So the answer is no - you can't really do it. The only way you could achieve a similar result is by pre-loading the CSS somehow, but there's not really much to be gained by doing this in most situations. Just put the CSS link toward the top of the page, and let the browser get it when it wants it. If you're having problems with the speed, try debugging it using firefox with the YSlow plugin. It gives you a lot of information about the structure of your page, and potential bottlenecks.