DEV Community

Cover image for How to improve web performance By using(Preload, Preconnect, Prefetch)
Sai gowtham
Sai gowtham

Posted on • Edited on

10 3

How to improve web performance By using(Preload, Preconnect, Prefetch)

Today I'm showing the simple techniques to make your site loads fast.

First, we need to know what is Preload, Preconnect, and Prefetch.

Preload: When we use preload in link tag it makes early fetch request to get the resource. Mostly used to fetch high priority resource that is used in the current route.

Preconnect: It resolves the DNS and TCP handshaking.

DNS-Preconnect: It only resolves the DNS.

Prefetch:It helps to fetch the resources and place it in the cache.
whenever the resources might need it will take it from the cache instead of making another request.

I think you can get a doubt what is a difference between preload and prefetch. preload is used for the high priority resources and prefetch is used for the low priority resources.

Now let's see a live example of Vuejs website.

By default vuejs website not using any of these above.

Let's check the web performance of vue site using chrome audits.

vuejs

Have you seen 43% is the performance on my machine?

After I'm using the Preconnect and Preload.

Now the Performance is 78%.

vuejs

Here is the exampleyou can check it on your own machine.

Now let's see which top sites are using these above Resource hints.

Amazon

Amazon

Github

github

Netflix

netflix

If you have any doubts feel free to ask.

Checkout --> Best Programming Laptops

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (1)

Collapse
 
sait profile image
Sai gowtham

I think you have removed CSS link tags.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up