Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript SEO Checker

Siim518

Active Coder
Hello, i have question about overall website SEO optimization. I have one site that i am working on at the moment and i would like it to be very search engine friendly. I usually check my website here: https://freetools.seobility.net/en/seocheck/majahaldur.ee to see how many errors or important fixes i must make. At the momen it shows 2 critical errors that i need to fix in Wordpress to make it search engine friendly. The question is: how to " reduce the number of used CSS files. " and "reduce the number of used JavaScript files." ? I have installed multiple CSS and JS compression plugins in Wordpress, but they all give a warning that some data might be lost if you compress (reduce) CSS or JS files, so i havent compressed them, i dont want to mess up my site. But is there any other solution how to fix those errors?

Thanks.
 
By 'reducing the number of CSS and JS files', it probably meant to reduce the number of files for each page by merging them. How many of such files do you have for each page?
By the way, with google Chrome, if you go on the page and open the developper tools (Right-click / 'inspect'), you can generate a performance/SEO report by clicking on the item 'lighthouse'.
 
1. Average amount JS files 102

The average number of embedded JavaScript files per page is determined. You should use up to 3 JavaScript files per page for a fast page load time.

2. Average amount CSS files 23

at the moment it shows this.
 
102 and 23 !! That is huge! Do you made them yourself or do they come with plugins and things like that?

You should merge them together and use something like 5 files each, max.
 
WPRocket is a good plugin for WordPress; Currently using it myself for this.

Also, don't be afraid of messing up your site through compressing files using a plugin; The way these plug-ins generally work is through changing delivery of the files, so when you switch it back 'off' it goes back to before :)

Try switching it on, and see if it improves performance/fixes the critical error on the SEO Checker. If it doesn't have much effect, or your page suddenly goes all white/HTTP 500 (typical WP errors) just go back to the backend and switch it off (the backend almost always works) You can also remove the plugin directory through the file manager/FTP and it will revert back with no permanent damage caused.

Hope that helps!
 
Hello, i have question about overall website SEO optimization. I have one site that i am working on at the moment and i would like it to be very search engine friendly. I usually check my website here: https://freetools.seobility.net/en/seocheck/majahaldur.ee to see how many errors or important fixes i must make. At the momen it shows 2 critical errors that i need to fix in Wordpress to make it search engine friendly. The question is: how to " reduce the number of used CSS files. " and "reduce the number of used JavaScript files." ? I have installed multiple CSS and JS compression plugins in Wordpress, but they all give a warning that some data might be lost if you compress (reduce) CSS or JS files, so i havent compressed them, i dont want to mess up my site. But is there any other solution how to fix those errors?

Thanks.
HI there,
So... best practices dictates you want to break out js into multiple files for the sake of separation of concerns. Same goes for css. This helps you not only keep track of changes, but be able to make the changes as well. What can help you mitigate the situation: in your development environment, go ahead and split it out into multiple files. When you are ready for to move to production, have a file, say site.styles.css, and site.funcs.js, and copy all the css and js into them. To help you with organization, section off each section with comments like:
Code:
/*==========home styling============*/
//code here
/*==========end home styling============*/

once everything is ported over, run the files through a minifier, and just add the minified files to production. As far as SEO analyzer sites, I personally use


However, seeing that you have a wordpress site, don't focus too much on the "too many files" warnings... but rather using less plugins. The more plugins you use, the more of a hit to performance your site takes, as well as open your site up to potential vulnerabilities with outdated plugins
 
SEO optimization is crucial for website success. Regarding your CSS and JavaScript files, you're on the right track with compression plugins. It's true that some data might be lost during compression, but it's usually negligible.

To minimize the number of files without compression, you could consider manually combining similar CSS and JS files into a single file each. This can help reduce the requests your site makes to the server, improving loading speed and SEO.
 
Back
Top Bottom