views:

99

answers:

2

need to add a 2nd css stylesheet to a page.

do i add a 2nd link line and load it by url, or add a @import to the original?

what is worse for page load times? what is worse for server load?

what is better for client side caching? what is better/more accepted 'in general'?

(note: assume no cdn or memcache, just a normal regular average LAMP webserver setup)

+2  A: 

You should definitely go with a second link. Read all about it here from High Performance Web Sites. The biggest problems occur if you mix link and @import, since it will interrupt the ability to download the style sheets in parallel. Also, IE has problems with multiple @import statements. For all the info, read the article. It's very thorough.

PatrikAkerstrand
+1  A: 

Here is and excellent analysis of the question. Short answer: Don't use @import.

moshen