How to Reduce the latency of resource loading Website ?
SEO Help and Tips
How to Reduce the latency of resource loading Website ?
Here are the techniques you can reduce the latency of resource loading for any website without any error.
Here are a few common used Tag:
This tag is used to preload a resource that will be needed in the future, such as a CSS file or an image. By preloading the resource, the browser can fetch it in advance, reducing the latency when it's actually needed.
Example: <link rel="preload" href="styles.css" as="style">
This tags defer the loading of images until they are near the viewport. It helps reduce the initial page load time by prioritizing the loading of visible content.
Example: <img src="image.jpg" loading="lazy" alt="Description">
CDNs are networks of servers located in various geographic locations. By storing your website's static assets (e.g., images, CSS, JavaScript) on a CDN, you can take advantage of their distributed infrastructure to deliver content to users more efficiently, reducing latency.
Example: <script src="https://cdn.example.com/script.js">
That's tag load the JavaScript file asynchronously. The async attribute indicates that the script should be executed asynchronously while not blocking the rendering of the HTML document. The attributes control, how the script is loaded and executed. These attributes allow the HTML parsing and rendering to continue while the script is being fetched, which can help improve the page load time.
Example: <script async='async' src='script.js'/>
The script is combined this tag will help to load asynchronously, allowing the HTML parsing and rendering to continue without waiting for the script to be fetched and executed. This can help improve the page load time and overall performance.
Example: <script async src="https://example.com/script.js">
The web developer is indicating to the browser that it should prefetch the DNS resolution for that domain. This means that the browser will resolve the domain's IP address in advance, allowing for faster subsequent requests to that domain.
Prefetching DNS can help reduce the latency of resource loading, as the DNS resolution process can be time-consuming. By prefetching the DNS, the browser can save time when making subsequent requests to resources from that domain.
Example: <link href='example.com/' rel='dns-prefetch'>
Comments
Post a Comment
Thanks for your Comments.