![]() |
Link or @import?
I finally figured out whether to use <link/>, or <script>@import css</script>!
yay Best Practices for Speeding Up Your Web Site Just wanted to share it with everyone, it's something that's bothered me for the longest time. |
I always use link. However, recently I've been organising my CSS files better. Now I have different CSS templates configured, and they import the CSS files I require. So I may have a CSS file called tables.css. That would load in my primary, secondary, and ternary CSS files for my HTML tables.
css Code:
|
Quote:
Code:
<style>@import css</style>In my master-stylesheet I then import other common ones - just like Wildhoney does. From a performance standpoint that might not be the best solution, but it serves me well in terms of workflow. |
I would use <link>, and its because of some browsers like some Opera 9'ers and older IE'ers will first read then HTML structure and THEN apply the CSS and not the other way, so the website transform will be abit weird while loading =)
|
You can always @import in the <link>'ed stylesheet so I've always had a few @import's at the top of my primary (navigation, css reset etc.) and then my core css underneath :)
|
| All times are GMT. The time now is 08:04 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0