Reputation: 811
My webpages uses 2 CSS files. Both contains some styles but not many. Will merge these two into a single CSS file improve the webpage performance?
Thanks
Upvotes: 1
Views: 120
Reputation: 1244
Reducing code smell, javascript placement, limiting css/html animations, cache management of images/assets/scripts and writing quality queries(more importantly, nested subqueries) are going to improve performance. Merging css files will only hurt code management.
Minifying your assets and/or converting css to sass/scss or less will increase performance NOT css file merging.
Upvotes: 1
Reputation: 264
Having css spread over files does not really do anything with your load speed. (I usually keep a different css file for big animation, big content blocks etc.)
But keep aware of folders. always keep all your css together in one folder, (not spreaded all over your directory).
Also css minifying (https://cssminifier.com/) Keep a minimised file loaded on your page, edit your normal file, then minify it and load the minified again. I believe this will do most regarding to load speed.
Upvotes: 2
Reputation: 224
Yes, it will but do not expect a big change in performance. You could save only a few KB. Removing all blank space inside css file will make a bit more difference (but keep a copy of the file, after removing blank space it is going to be difficult to edit the file) but still as far as size is concern you will not make any difference. But I recommend you to do it because your site will have less "links" do download and will be closer to SEO rules.
Upvotes: 1
Reputation: 36
No, it's the same. Performance improving could be accomplished in some different ways (e.g. removing unused or duplicated styles).
Upvotes: 1