So what does it mean to defer parsing of JavaScript?Įssentially, your site will tell visitors’ browsers to wait to download and/or parse JavaScript until after your site’s main content has already finished loading. If a certain script isn’t necessary to the core functioning of your site ( at least on the initial page load), you don’t want it to get in the way of loading more important parts of your site, which is why those page speed testing tools always tell you to defer parsing of JavaScript. It will do this for each script that it finds, which can have a negative effect on your site’s page load times because the visitor needs to stare at a blank screen while their browser downloads and parses all the JavaScript. If, in moving from top to bottom, it finds any JavaScript, it will stop rendering the rest of the page until it can fetch and parse the JavaScript file. The visitor’s browser then starts at the top and goes through the code to render your site. If you’ve ever run your WordPress site through Google PageSpeed Insights, GTmetrix, or other page speed testing tools, you’ve probably come across the suggestion to defer parsing of JavaScript.īut…what does that actually mean? And why is it an important performance consideration?īasically, when someone visits your WordPress site, your site’s server delivers the HTML contents of your website to that visitor’s browser. What Does It Mean to Defer Parsing of JavaScript in WordPress?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |