Schema - Post ID 282014

User 2903050 Photo


Registered User
260 posts

Would you say you would combine two CSS files into one big one?
Say for mobile that has CSS for the header and navigation, would you promote that styling to the top of the style sheet to help it load quicker. As for js files, would you combine them into one then get a program to minify them?
I have already started messing around with my site in the editor atom.io. it's really cool and find it easier to move stuff around with the orders of the CSS and script etc
User 2450707 Photo


Registered User
94 posts

<Would you say you would combine two CSS files into one big one? >
I would.

<Say for mobile that has CSS for the header and navigation, would you promote that styling to the top of the style sheet to help it load quicker.>
No. I think the CSS file has to be read to the end before it is implemented.
So, for the top of your page(s), i.e. a screen full on any device, have code that does not require a CSS file at all! ;)

< As for js files, would you combine them into one then get a program to minify them?>
Yes. Download them locally. Combine. Minify. And test that they still work after that.
Exception: any files that are loaded from a CDN repository will likely be faster than loading from your server..

<I have already started messing around with my site in the editor atom.io. it's really cool and find it easier to move stuff around with the orders of the CSS and script etc>
I must have a look at atom.io too.
The last CSS file loaded is the one that takes precedence, but second only to inline styles.
But caching in your browser can play tricks with you in this regard!

It's a pity that once you make an edit outside of SD3, using SD3 any further on those pages is pointless.
I hope the developers can think of a solution for this. They have cracked bigger issues already.

Best wishes,

Daniel

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.