Add "Page loaded in ..." For blogger
Today with a light added is They show the page load time , as in this picture
This add-on is very easy
As usual we go to control panel, Design and Edit HTML
First thing take a backup of your template.
click "Expand Widget Templates"
and look for this words
and past this code under it<Head>
now look for this :<!-- page load timer --><script type='text/javascript'>var d = new Date();var starttime = d.getTime(); //Get the start time</script>
and past just before it this code :</body>
save the template<!-- page load timer start by a4why.blogspot.com --><script type='text/javascript'>var d2 = new Date();var endtime = d2.getTime(); //Get the end time//Find the difference between the start and end timesvar totaltime = (endtime - starttime)/1000;//Round 2 decimal placesvar result = Math.round(totaltime*100)/100;//Output results to a "P" elementdocument.getElementById("loadtime").innerHTML = "Page loaded in: "+ result +" seconds";</script><!-- page load timer end by a4why.blogspot.com-->
then go to "pageElements"
and add a gadget "HTML/JavaScrpit"
Put This code and save
change "a4why.blogspot.com" with what you want<!-- Widget portion --><p id="loadtime">a4why.blogspot.com</p>
The result will be show the time of loaded the page In the place that you put the gadget
0 comments:
Enregistrer un commentaire