Tell your Blog to Load Fast with Lazy Load Script

0
268
views

The most annoying thing in most of the blogs I feel is the loading time. I hate sitting and waiting for all images to load and I can start view properly. It looks like we have only few images to load and icons on our page. But the fact is there are so many images in our template , specially in hacked templates. Sometimes it happens growing our blog also increases the loading time.

You must have read so many articles to reduce loading time of blog . Anyone of them worthy? May be Or you have seen some blogs or sites which use to load their images only when they are required. Sounds intelligent. Isn’t it? Here I am sharing with you the secret for this. A small piece of code can help you here.



The name is Lazy Load Plugin .

This script will load images only which is displayed onto the present screen. Scrolling further will load the other images as well.

Get it now !

Just copy the code below and paste in your header section or find </head> tag in your template and paste above it.

<script charset=’utf-8′ src=’http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js’ type=’text/javascript’/>

<script src=’http://bnote.googlecode.com/files/jquery.lazyload.js’ type=’text/javascript’/>

<script charset=’utf-8′ type=’text/javascript’>

$(function() {   $(&quot;img&quot;).lazyload({placeholder : &quot;http://bnote.googlecode.com/files/grey.gif&quot;,threshold : 200});});

</script>

 It might take a little to work as programmer are working with it for better performance with all the latest browsers.

Abhi

About the Author

This article is written by: Abhi Balani – Founder of OddBlogger. Subscribe to Feeds or Like on Facebook. Contribute to this Web-blog , Write For Us
Abhi Balani Social Links Add on Facebook, Follow on Twitter, Add to your Circles in G+.

Leave a Reply