Jump to content

External Resources


RobertP

Recommended Posts

I am looking for a resource friendly (on both the server and the visitors browser) for loading css and javascript files.

 

I am currently loading both by external links:

<link rel="stylesheet" href="..." />
<script src="..."></script>
I have been contemplating on weather or not i should just embed the css in the html file..
<style>...</style>
Background: I am developing a large scale platform that will host websites. It will deploy itself as a distributed cms.

 

If you have a better idea for performance within this category, please share for the community (and me :))

Link to comment
Share on other sites

There's no reason to embed the CSS in the HTML if you take the time to optimize and minimize your file(s). An extra HTTP request is negligible in and of itself. It's what is contained within (references to images especially) that slow everything down. Since you'll need to load all that anyway....

 

Do the usual - optimize your images, use sprites, combine files, and minimize. You can do most/all of that dynamically using Assetic.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.