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 :))

Edited by RobertP
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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.