Combining CSS
-
One recommendation from a page speed analysis of my site was to combine CSS (external style sheets) but after reading more on the topic others say that this is not always best. Any thoughts on either approach?
-
Hi Brett,
The reasoning behind combining CSS files is to reduce the number of files that need to be requested when the page is loaded. If you load one CSS file instead of five CSS files, your page should load somewhat faster. This is especially true when dealing with larger CSS files (for example, five large CSS files combined to one really large CSS file will usually make the site load faster). I'd recommend combining CSS files if you can. Depending on what system you are working with, and how much control you have over the code, you may not be able to. What reasons were given to not combine files?
Matthew
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Combining adjacent image and text links
Hey, The pages on one of our sites has a lot of links on it, which I have read a couple of times can be bad for SEO, although many say don't worry too much about it. However, I was thinking to reduce links and also reduce code size combining adjacent image and text links. For example they current look like this:
On-Page Optimization | | mdeluk
"
Products page" I am thinking maybe I should change to the following:
"Products page" However, is this bad code and therefore could be bad for SEO? I have tried Googling this but couldn't seem to find anything on it.0 -
Eliminate render-blocking CSS in above the fold content with shopify
Hello, It seems that my shopify website needs to eliminate render-blocking CSS in above the fold content to get better mobile speed and I don't see or find anything about how this could be done. I have succeeded with a wordpress site but the way things are restricted with shopify, I have not been able to do the same. The other thing would be to leverage browser caching which I have no clue how it can be done with shopify either. Thanks!
On-Page Optimization | | Mabo320 -
How many css and Javascript on ecommerce site?
Hello, I want any tool which seach css and javascript of whole ecommerce cite? Please suggest. Thanks! Dev
On-Page Optimization | | devdan0 -
Two Word Company Name (Combined to One) & SEO
Hi All, I'm dealing with a company that has a two word name like "GreatCompany". They rank #1 for that but not for "Great Company". The phrase is not super competitive, but obviously they are not writing the company name with two words anywhere on their site. Has anyone had to deal with something like this? Thinking about creative solutions but I'm fairly sure we're going to need to use the name both ways to have an effect here (or use PPC to augment) but I don't really love the idea of doing that... will feel very odd and inconsistent for visitors. Thanks!
On-Page Optimization | | ketanmv0 -
CSS family names and whitespace
A CSS validation notes the following: Family names containing whitespace should be quoted. If quoting is omitted, any whitespace characters before and after the name are ignored and any sequence of whitespace characters inside the name is converted to a single space. Not sure what this means or how to fix. Help. thanks
On-Page Optimization | | casper4340 -
Unused CSS
Is there any advantage to removing unused CSS on a wp theme template. If removed will it not merely be added with the next update?
On-Page Optimization | | casper4340 -
CSS validation
After validating the CSS on my site the error "Parse Error title=" was shown with no explanation. What is this?
On-Page Optimization | | casper4340 -
Html and css errors - what do SE spiders do if they come across coding errors? Do they stop crawling the rest of the code below the error
I have a client who uses a template to build their websites (no problem with that) when I ran the site through w3c validator it threw up a number of errors, most of which where minor eg missing close tags and I suggested they fix them before I start their off site SEO campaigns. When I spoke to their web designer about the issues I was told that some of the errors where "just how its done" So if that's the case, but the validator still registers the error, do the SE spiders ignore them and move on, or does it penalize the site in some way?
On-Page Optimization | | pab10