Follow

How to make your page load faster in Wordpress


downloading one file is faster than downloading three 

Combine External CSS


Each CSS file you are using for your website adds time to your page load speed.

Sometimes this is unavoidable, however in most cases you can combine two or more CSS files together using nothing more than "copy and paste".
Often the only reason you have multiple CSS files being called is because your website designer found it easier to work with separate files. CSS code doesn't care where it is at or how many files it is in. One CSS file that contains all the info of your separate CSS files combined will work just as well and improve your page speed. Putting all of your CSS into one file substantially reduces the amount of time it takes to load your web pages because you are reducing the amount of things the web browser has to load before displaying your page.

Tip - To determine how many CSS files your webpages load use the CSS delivery tool which will list each file that is being called.

How to combine your CSS

You can often just copy and paste the contents of each CSS file together to make one main CSS file.
Sometimes you will have many CSS files being called and you can just create one new CSS file which has all the contents of the others.

copy the contents of one css file and paste it into another to combine them

This method will keep all your old CSS files safe and named correctly if you need to go back to them. You would then update your HTML to call the new file and remove all the calls for the old files.
Many times you will just have two or three CSS files and you can just add the contents of one into an exsisting file... for example, you may have a CSS file called "main.css" and another called "sidebar.css" being called by your HTML. In this situation your could open your "sidebar.css", copy and paste the contents of the file into "main.css".
Once you have done that, you would remove the call for "sidebar.css" from your HTML. You now have just one CSS file instead of two that a web browser must load before displaying your webpage. Your webpage will now load faster.

 

0 Comments

Please sign in to leave a comment.
Powered by Zendesk