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 -
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 -
Having a terrible time ordering the CSS Styles and Scripts in my header
Hi Guys, I am having a terrible time trying to get the correct optimized (for speed, none blocking etc) order for loading my external css and JS. I follow the recommendations from Google Page Speed or Chrome Audit and it seems no matter where I move the CSS file too (top or bottom) it complains about more blocking and stopping rendering of the page. My URL is http://www.MyFairyTaleBooks.com if some smart person out there could help me figure out what I am doing wrong and the order in which my should be organized I'd appreciate it! Oh I'm not a developer but I can re-arrange text in a file! 😉 Thank you!
On-Page Optimization | | MyFairyTaleBooks
Dinesh0 -
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 -
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 -
CSS background images weight impact
Hi,
On-Page Optimization | | GianniCuccu
do you think that the use of a single 1.8Mb background image sitewide could have a big negative impact and make a website disappear from SERPS? thank you0