April 30, 2012

Why and How To implement DNS Prefetching

This technique lets webmasters speed up loading time of a web page by asking web browsers to automatically execute DNS lookups on others hosts that you will later on link to.

Suppose I have to link to some images on further sections of this webpage then I'd implement DNS prefetching on the domain that hosts those images.

Example:

<link href="http://i.technoslab.com" rel="dns-prefetch"></link>

This technique alone can decrease page/resource loading time by 20 to 120 milliseconds and can come in very handy when you're working with a high traffic website.

No comments:

Post a Comment