RobertP Posted March 26, 2013 Share Posted March 26, 2013 (edited) 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 March 26, 2013 by RobertP Quote Link to comment https://forums.phpfreaks.com/topic/276197-external-resources/ Share on other sites More sharing options...
KevinM1 Posted March 27, 2013 Share Posted March 27, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/276197-external-resources/#findComment-1421309 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.