How to exclude unnecessary CSS and JS files from loading?
-
Hello there
I have created my own WordPress site and my own theme (with Artisteer) about a year ago. The site looks nice and is working fine and doing what I want it to do, but recently I have been disappointed that Google thinks my site is SLOW ?? I have then decided to have a look into why things load so slowly and discovered that every single page was loading ALL of the CSS and JavaScript files use throughout my site. Many of these files are not necessary to be loaded for some pages and slow them down. There are for example some CSS files for the contact form, but those same files are loaded for my index page as well. There are many Javascript files needed for my photo gallery, but those same files are also loaded for my index page, contact page, blog page… Obviously this is redundant and makes the site slower than it should be.
I am wondering, does anybody have any ideas on how to fix this problem?? I would like to load ONLY the NEEDED files for each page.
- The topic ‘How to exclude unnecessary CSS and JS files from loading?’ is closed to new replies.