Sunday, December 15, 2013

Speed up your blog using Javascript - Blogger Lesson

By FreewareHut  |  4:18 PM 4 comments


Hey guys, how are you? Today I'm going to give you a good trick to speed up your blog's loading.. Sometimes we add Images, some Javascripts and CSS Scripts to our blog template for the beauty. But they will slow your blog's loading. So today I'm bring a good solution for this. It can load your blog as a Lamborgini speed. It loads your blog in several steps. The blog is loading according to your Scroll down. It has massive speed.


So we do it now,

First Go your blogs Control Panel.


And Click on Template Tab and Edit HTML Button

Now you can see a HTML box on your screen.

Press Ctrl and F after clicking in the HTML box.
Now type </html> in the Search box and Press Enter.


Now Copy and Paste above codes just before </html> tag.


<script type='text/javascript'>//<![CDATA[ (function(a){a.fn.lazyload=function(b){var c={threshold:0,failurelimit:0,event:"scroll",effect:"show",container:window};if(b){a.extend(c,b)}var d=this;if("scroll"==c.event){a(c.container).bind("scroll",function(b){var e=0;d.each(function(){if(a.abovethetop(this,c)||a.leftofbegin(this,c)){}else if(!a.belowthefold(this,c)&&!a.rightoffold(this,c)){a(this).trigger("appear")}else{if(e++>c.failurelimit){return false}}});var f=a.grep(d,function(a){return!a.loaded});d=a(f)})}this.each(function(){var b=this;if(undefined==a(b).attr("original")){a(b).attr("original",a(b).attr("src"))} if("scroll"!=c.event||undefined==a(b).attr("src")||c.placeholder==a(b).attr("src")|| a.abovethetop(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.rightoffold(b,c)){if(c.placeholder){a(b).attr("src",c.placeholder)}else{a(b).removeAttr("src")}b.loaded=false}else{b.loaded=true}a(b).one("appear",function(){if(!this.loaded){a("<img />").bind("load",function(){a(b).hide().attr("src",a(b).attr("original"))[c.effect](c.effectspeed);b.loaded=true}).attr("src",a(b).attr("original"))}});if("scroll"!=c.event){a(b).bind(c.event,function(c){if(!b.loaded){a(b).trigger("appear")}})}});a(c.container).trigger(c.event);return this};a.belowthefold=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).height()+a(window).scrollTop()}else{var d=a(c.container).offset().top+a(c.container).height()}return d<=a(b).offset().top-c.threshold};a.rightoffold=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).width()+a(window).scrollLeft()}else{var d=a(c.container).offset().left+a(c.container).width()}return d<=a(b).offset().left-c.threshold};a.abovethetop=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).scrollTop()}else{var d=a(c.container).offset().top}return d>=a(b).offset().top+c.threshold+a(b).height()};a.leftofbegin=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).scrollLeft()}else{var d=a(c.container).offset().left}return d>=a(b).offset().left+c.threshold+a(b).width()};a.extend(a.expr[":"],{"below-the-fold":"$.belowthefold(a, {threshold : 0, container: window})","above-the-fold":"!$.belowthefold(a, {threshold : 0, container: window})","right-of-fold":"$.rightoffold(a, {threshold : 0, container: window})","left-of-fold":"!$.rightoffold(a, {threshold : 0, container: window})"})})(jQuery);$(function(){$("img").lazyload({placeholder:"http://i22.servimg.com/u/f22/15/42/72/40/grey10.gif",effect:"fadeIn",threshold:"-50"})})//]]></script>

Ok, Now save the Template. 

See a Preview of your blog. Now you can see your blog is loading speedly. It's awsome isn't it? 

OK. now I'm going to say Good Bye. I'll bring a new lesson in next post. Keep in touch.

Author: FreewareHut

Hello I'm Sandun Isuru from the great island Sri Lanka

4 comments:

  1. Gemini two-factor authentication helps in securing your account and assures you that no unwanted activity has crossed the path of your account. If you don’t know how to deal with such issues and you’re looking for assistance, you can always take help from the team who is ready to assist you. Call on Gemini support number which is always active and users can contact the Gemini Support Number team anytime to get fruitful results which are easy to execute and the team can get in touch with you to avail solutions.

    ReplyDelete
  2. Time out errors are abrupt errors and to fix them at the earliest stage helps in protecting your account. If you are facing time out errors in Gemini account and looking for ways to deal with it, you can always take help from the team who is there to assist you. You can call on Gemini customer service number which is always there as users can contact the team anytime and Gemini Support Number provide solutions which are easy to access. Talk to the team for fruitful results and get verified solutions immediately.

    ReplyDelete
  3. Thanks a lot for such a wonderful concept! I appreciate your concern about hiring a professional Javascript developer for the businesses. It was a mind-blowing explanation that the experts helped eliminate the technical glitches that might affect the entire project execution. While administering my hiring team, I recently came across a wonderful platform EIliana.com which aided me in hiring experts for the company. I suggest the same for the people looking for similar assistance.

    ReplyDelete
  4. Get Best Buyer leads for real estate agents By Pingcall websites.
    Wondering how to get Buyer leads for real estate agents without spending a dime? Contact Pingcall for an effortless and data-driven lead generation program for high-quality leads in your funnel. Pingcall has served different types of businesses from B2B to D2C and helped them attract leads that transitioned into customers within minutes. A highly efficient team of professional marketers, data logistics, and the best tools and resources are in line to expand your growth prospects. We have researched every industry thoroughly to get the best leads from high-value chains. Our clients come from different walks of investment and have been reaping the fruits of the trust they put in our services. Looking for prospects who are interested in your business? Visit the best real estate lead generation website today!
    So for more call us@+1-(855) 239-7670 or visit at website:http://www.pingcall.com/
    location 31W 34th Street, New York, NY 10001
    Contact No:+1-(855) 239-7670
    Email Id: emailhelp@pingcall.com

    ReplyDelete

E-mail Newsletter

Sign up now to receive breaking news and to hear what's new with us.

Recent Articles

TOP