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
-
Content that's behind CSS..
For content that's been loaded onto the page.. but it requires a click for it to be revealed.. as in a slider, or a tab, to save space or for a page's organization.. what are your thoughts on Google counting or weighting this content? It would make sense for Google to give it partial or no weighting as if Google attributes the content to being there, its confusion for the user to land on the page and have to find it/click around to find it.. Sorry if this is an obvious question to SEOs.. I've always assumed as long as it was loaded, it'd be mostly counted.. but I'm beginning to doubt my assumption. Thanks!
On-Page Optimization | | speedcommerce0 -
Combine poorly ranking pages into a single page?
I'm doing on-page optimizations for an apartment management company, and they have about seven apartments listed on their site. Rather than include everything on the same page - /apartments/apartment-name/ - they have the following setup: /apartments/apartment-name/contact /apartments/apartment-name/features /apartments/apartment-name/availability /apartments/apartment-name/gallery /apartments/apartment-name/neighborhood With very few exceptions, none of these pages appear to rank for anything, and those that do either rank very poorly for seemingly random keywords or for keywords like the apartment complex name (alongside the main landing page for the complex). I'm of the mind to recommend combining the pages into a single one that contains all the info, eliminates the chances for duplicate content (all of the neighborhood pages contain the same content verbatim), and prevents keyword cannibalization. Thoughts? Thanks.
On-Page Optimization | | Alces1 -
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 -
Unused CSS Tool Recomendations
Hey moz, Im currently converting my site to mobile as its an older template based on tables it will make a lot of CSS redundant. I cant delete as i go incase a page uses it im unaware of so need to clean it up when its done. Is there a tool that crawls my entire website and highlights the unused CSS in the files? Ive found a few paying tools that claim to do so but am reluctant to just spend money on something without a recommendation. Cheers!
On-Page Optimization | | ATP1 -
How to rank well on 2 keywords - 2 separate pages or 1 combined page
Hi, I have a website about allergy. We ar developing new content, and through keyword research I have discovered that "dog allergy" and "cat allergy" are both very common searches. However, the cause, and symtoms are very alike for these 2 types of allergy so it would make sense to combine the two allergies on one page. So my question is: What do I choose to increase my chances to ranke the best I can for both "cat allergy", and "dog allergy"? Should I develop 2 separate pages for cat & dog allergy or should I do a combined page? (We would of course review the texts so no duplicate content/text would be used if we chose to have 2 pages) I would be so greatful for your advice!! Kind regards, Jeanette
On-Page Optimization | | Mylan-GDM0 -
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 -
Will google see you bold/emphasis words if done in css?
We do not use header tags in our website. I understand bolding or emphsising words can be equally as effective but if done so in css will the google crawlers and spiders etc be able to put a weighted value on this style of code???
On-Page Optimization | | gsbureau0 -
CSS and Spiders
I am using website auditor for my onsite SEO and I am getting a ton of CSS warnings. How important is to fix these issues? Where would you place this in you priority list?
On-Page Optimization | | SEODinosaur0