Tuesday, June 11, 2013
Do you face problem when you access Blogger's Edit HTML tab like you are redirected to your live blog? It comes as preview, in normal it happens only if you hit the preview button, but if you face the trouble then you may be wondering, why it happens, why are you getting redirected just as you access the edit HTML page, even before you haven't done anything?

I faced this trouble, and i thought that it was an error on blogger, but i was wrong, yes that came to be error, but that error came from my template, not blogger. Maybe like that.

Its cause is very simple, there is a chunk of script code of blogger template that will cause your browser to be redirected to your live page, if you face it already then it means that you have the code in your template, i'd say 80 out of 100% of possibility you have the code. Generally, default blogger templates do not include the code, the code might came by you, if you got it. The reason you put the code in your template is most likely because you don't want to let images on your blog are downloadable through google search. Say, somebody is searching through google and then he finds any image belong your blog, well that way, he'll have to visit your blog directly in order to be able to download the image, otherwise no image will come to be downloaded.

Here is the chunk of script code that i mean, i guess you might put the code somewhere around the closing tag </body>, it's the right place to holding the code.

<script language='JavaScript' type='text/javascript'>
if(top.location!=self.location) top.location=self.location;
</script>

By removing the code from your template, you are decreasing the occurance of its unexpected redirecting problem whem accessing your Edit HTML page, or even better it may solve the problem.

Well done! Now let me to dismiss my self, sir! :)

0 comments:

Post a Comment