dophinsluv
06-16-2007, 08:37 PM
Questions:
The following code came from http://google.com and allows the user to make your site a home page. If the page is already the user's home page the link doesn't appear.
<span id=hp style="behavior:url(#default#homepage)"></span><script><!--
(function() {var a="http://yourwebsite.com/",b=document.getElementById("hp"),c=b.isHomePage(a);_rptHp=function(){(new Image).src="/gen_204?sa=X&ct=mgyhp&cd="+(b.isHomepage(a)?1:0)};if(!c){document.write('<p><a href=/mgyhp.html onClick=document.getElementById("hp").setHomepage("'+a+'");_rptHp();>Make TheWebTitan Your Homepage!</a>')};})();//-->
</script>
Here are the questions:
Can someone explain what the code is doing?
Google doesn't specify a default client script language. How do they know what script language the browser will run?
What is "/gen_204..." doing? Robots don't seem to like this very much. They can't find the link.
Thanks for your help!
The following code came from http://google.com and allows the user to make your site a home page. If the page is already the user's home page the link doesn't appear.
<span id=hp style="behavior:url(#default#homepage)"></span><script><!--
(function() {var a="http://yourwebsite.com/",b=document.getElementById("hp"),c=b.isHomePage(a);_rptHp=function(){(new Image).src="/gen_204?sa=X&ct=mgyhp&cd="+(b.isHomepage(a)?1:0)};if(!c){document.write('<p><a href=/mgyhp.html onClick=document.getElementById("hp").setHomepage("'+a+'");_rptHp();>Make TheWebTitan Your Homepage!</a>')};})();//-->
</script>
Here are the questions:
Can someone explain what the code is doing?
Google doesn't specify a default client script language. How do they know what script language the browser will run?
What is "/gen_204..." doing? Robots don't seem to like this very much. They can't find the link.
Thanks for your help!