PAGE-LOAD TIMER SCRIPT FOR BLOGGER BLOGS.

 On Minggu, 15 Juli 2012  

Have you seen websites displaying web-page load time? Do you want this feature in your blog? If yes,then Read-on.

In this post,I will be explaining how you can easily add this widget to your blog.

How to add load timer to blogger blogs

To add this widget to your blog,follow the steps below.

Step 1:

Login to Blogger & go to Design/Layout » Edit HTML[Always remember to backup your template.] Check the box next to Expand Widget Template and search for <head> by pressing CTRL+F. Once you get that,copy-paste the codes below directly after it.
<!-- page load timer --> <script type='text/javascript'> var d = new Date(); var starttime = d.getTime(); //Get the start time </script>

Step 2:

Find </body> in your template and immediately before that,copy-paste this code:
<!-- page load timer begins --> <script type='text/javascript'> var d2 = new Date(); var endtime = d2.getTime(); //Get the end time //Find the difference between the start and end times var totaltime = (endtime - starttime)/1000; //Round 2 decimal places var result = Math.round(totaltime*100)/100; //Output results to a&quot;P&quot; element document.getElementById(&quot;loadtime&quot;).innerHTML = &quot;Page loaded in:&quot; result &quot; seconds&quot;; </script> <!-- page load timer ends -->

Preview and Save template.

Step 3:

Login to Blogger » Design »Page element and select 'Add a gadget'. Next,scroll down till you find "HTML/JAVASCRIPT" and click on ADD. Now,copy-paste the following codes in it:
<!-- Widget portion --> <p id="loadtime">Your custom message goes here</p>
Finally,save widget and view your blog to see the load-timer. If you are not satisfied with the “Page loaded in:” that displays together with the load-time,simply change it in “step 2” above.
PAGE-LOAD TIMER SCRIPT FOR BLOGGER BLOGS. 4.5 5 Unknown Minggu, 15 Juli 2012 Have you seen websites displaying web-page load time? Do you want this feature in your blog? If yes,then Read-on. In this post,I will be exp...


Related Post:

  • ANIMATED FOLLOW-US WIDGET FOR BLOGS.Have you ever wondered if it's really possible to have an animated widget?...If yes,then I'm glad to introduce to you this animated 3D[three dimension] FOLLOW-US widget which can easily catch the attention of your blog visitors.It was designed in for… Read More
  • “BOOKMARK THIS SITE” WIDGET FOR BLOGGER.́Bookmarking widget̀ in my perspective,is one of the ways you can retain your blog's visitors. Some people tend to forget/ignore bookmarking a site even if they like the post. Having the widget installed in your blog can help prevent that.Bookmark sc… Read More
  • CREATE CUSTOM PERMALINKS FOR ALL BLOGGER POSTS.You might have noticed some blogs having shortened urls at the top/bottom of every post with a “Share this post” text. This is a very nice widget which can help increase your blog's traffic as visitors won't have to go through the stress of manually … Read More
  • RECENT COMMENT WIDGET FOR BLOGS.The default 'Recent comment widget' for blogger is something that doesn't work on most blogs {mine inclusive},and this made me explore Google in search of a valid recent comment gadget.After searching for days,I finally came across one and decided to… Read More
  • PAGE-LOAD TIMER SCRIPT FOR BLOGGER BLOGS.Have you seen websites displaying web-page load time? Do you want this feature in your blog? If yes,then Read-on.In this post,I will be explaining how you can easily add this widget to your blog.How to add load timer to blogger blogsTo add this widge… Read More

Tidak ada komentar:

Posting Komentar