Google shares six ways to make your website faster and more efficient by optimizing JavaScript.
See which organic keywords actually drive conversions
Replace (not provided) with actual keywords and monitor their specific performance metrics in Google Analytics.
In a new video from Google, Developer Advocate Alan Kent shares six ways to optimize JavaScript to improve the performance of your website.
Kent identifies common performance problems caused by JavaScript and goes over steps you can take to fix them.
1. Avoid JavaScript File Proliferation
Avoid proliferation in the number of JavaScript files on your site.
The number of JavaScript files could become excessive if you’re not careful, especially if each UI component is in a separate file.
Reducing the number of JavaScript files a browser has to download can improve website performance.
How To Detect
The Opportunity section of the PageSpeed Insights report lists recommendations specific to your site.
Look for the recommendation to keep request counts low and transfer sizes small.
Click on the recommendation for a summary of the number and sizes of resource types requested including JavaScript files.
How To Fix
You can fix this problem in a number of different ways. One option Google recommends is to combine smaller files together to have a single, larger file to download.
Another fix is to support HTTP2 on your site, as it can improve performance without joining files.
2. Avoid Excessive DNS Lookups
Avoid an...
Read Full Story: https://www.searchenginejournal.com/6-javascript-optimization-tips-from-google/451021/
Your content is great. However, if any of the content contained herein violates any rights of yours, including those of copyright, please contact us immediately by e-mail at media[@]kissrpr.com.