![]() ![]() JavaScript can be critical to functionality, and CSS equally as important for page structure, element visibility, and content presentation, among other things. We strongly recommend that you set up a staging environment before you publish any code alterations to your live site. ![]() This guide will show how to quickly identify unused code in JavaScript and CSS resources so that you can take action, only load what is necessary, and improve your page load speeds. With Page Experience (notably Core Web Vitals, for the purposes of this discussion) being taken into account by Google’s algorithms for ranking, it is important to make sure that you are doing everything you can to provide a good user experience, including reducing page load times and other page experience metrics such as Time to Interactive. ![]() This means that the longer that JavaScript or CSS take to execute, the longer the page remains unresponsive to user interactions, leading to a less-than-satisfactory user experience. Additionally, user interactions also run on that main thread. JavaScript and CSS typically take the most time to parse, compile and execute. ![]() The more code you are trying to process, the longer it will take to finish loading the page. Each resource is a single car driving down that road, all of which have to arrive at their destination - the browser - for the page to finish loading. Think of it as a single-lane, one-way road. Most code is processed and loaded in the browser through what is known as the main thread. Often a page will end up loading resources, such as JavaScript and CSS, containing code that isn’t actually needed to build the page in question as a result, page load speed increases needlessly. When you visit a web page, your browser requests all of the resources it needs to build it. ![]()
0 Comments
Leave a Reply. |