Hi, This post contain a script to find your Blogger loading time. This is a real widget .Feel it now.
Leave a comment…………………….
- Login to you Blogger dashboard.
- Go to templates, click on Edit HTML option and Proceed.
- Find (Ctrl+F) <head> tag.
- Paste the below code after <head> tag.
<!-- page load timer -->
<script type='text/javascript'>
var d = new Date();
var starttime = d.getTime(); //Get the start time
</script>
- Now find (CTRL+F) </body> tag in the template.
- Paste the below code before </body> tag and save the template.
<!-- page load timer start -->
<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 "P" element
document.getElementById("loadtime").innerHTML = "Page loaded in: "+ result +" seconds";
</script>
<!-- page load timer end -->
- Save template.
- After that go to Layout.
- click on “ADD A GAGDET".
- Select HTML/Java Scripts.
- Copy and paste below code.
<!-- Widget portion -->
<p id="loadtime">Write your custom message here</p>
- Save It and click preview.
Leave a comment…………………….
0 comments