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
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
-
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 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 -
CSS Sprites
I have 6 social icons linked from the header area of my site and I am trying to replace them with a CSS Sprite but cannot get it to work. The current icons are located in a header widget area of my theme through a text box. When I add the new html in the text box and the CSS in the style sheet, the sprite does not show up. Are there any good tutorials on this subject?
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 -
Efficient CSS Selectors
How much practical impact do inefficient CSS selectors have on page speed?
On-Page Optimization | | casper4340 -
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