Forum Moderators: not2easy
I know the content of the <link> tag gets cached by most (all?) browsers and thus only needs to be downloaded once. But what about the @import method of calling a stylesheet? Will that cache just like <link> will do?
The idea is to call as little CSS per page as necessary, depending on page features. But if @import isn't cached, I may just opt to do one large CSS file and call it with the <link> tag.
The benefit that using <link> gives you is that you can specify alternate style sheets and switch between them. Other than that, they should be completely identical.
<style type="text/css">
<!--
@import url(druck.css) print, embossed;
@import url(pocketcomputer.css) handheld;
@import url(normal.css) screen;
-->
</style>
Sometimes you would use @import rather than <link> to prevent older browsers like Navigator 4.x to see the stylesheet at all.
I've done a combination of 'link' for the basics (color, font, etc) and 'import' for positioning, etc. Having 'link ' in there with 'import' stops the flash.