How to Overcome Reduce DNS Lookups on GTmetrix YSlow

Read too:

How to Overcome Reduce DNS Lookups on GTmetrix YSlow
This time, I again share how to improve GTmetrix scores, especially on YSlow's Reduce DNS Lookups section. In the Indonesian language, we can call down the DNS lookup.


What is Reduce DNS Lookups?

Reduce DNS Lookups, can also be interpreted as reducing DNS lookup is a blog loading problem on GTmetrix section YSlow. In short, on this issue, GTmetrix tells us to reduce external scripts hosted in different places.

Examples like this. You open my blog, and on my blog, there are some scripts that are hosted outside or external. Each one I hosted at:

  1. Github
  2. Yourjavascript
  3. Google Drive
  4. Wordpress Self Host

Without your awareness, doing a host like this can slow down the loading of blogs, because the browser will request to different places and take more time to receive responses from the DNS of each script.

Same as the browser. It has to go to another place (DNS) just to load the Javascript you hosted earlier. Of course, this can speed up blog loading as it reduces the response time for browsers to perform lookups to various places.

In short, the boy we talked about just bought in a shop for the four items that were ordered to buy by his mother. So he is not too tired and does not waste much time.

How to resolve this Reduce DNS Lookups issue?

Well now back to the topic of discussion, how to solve it?

Actually quite easy, but boring and make a little sore, because we have to re-post all the script to a place.

Try it now you see all the external scripts in your blog, then collect, record, and delete the original script. More or less the form of the note becomes like this:

http://www.abc.com/script.js 
http://www.def.com/script.js 
http://www.ghi.com/script.js 
http://www.jkl.com/script .js

Everything is hosted in different places, script one on abc.com, script two on def.com, and so on. I strongly suggest to make it only hosted in one place, that is Github. So more or less the shape becomes like this:

http://github.com/script.js

The way is quite easy, you just need to open one by one link script hosted at different places earlier, copy the contents, then enter everything in 1 file notepad.

// Script 1 (host from abc.com) 
 .... 
// Script 2 (host from def.com) 
 .... 
and so on

After that, save it in .js format. Give the appropriate name eg script-blog.js. After that, please host this file in Github, tutorial is on the Internet. After that, insert again the script that has been hosted earlier in your HTML template.

Please note, always back up templates before making changes to templates, especially Edit HTML. Moreover, not all scripts can be re-hosted elsewhere because it can cause damage.

If this article is felt interesting and useful, please share it by pressing the button below :)

Share this

Related Posts

Previous
Next Post »

Insert your comment below...