Have you ever looked at a page in Google’s cache? Do a search and by the results for each you can see a “Cached” link.
If you click on it you’ll see a page like this.
You can see at the top that the page has a huge disclaimer on the site that takes a lot away from your page. Wouldn’t it be nice to hide it?
Well, it’s easy to. Just put this javascript on the page and you’ll be all set.
<script language=”JavaScript” type=”text/javascript”>
<!–
var UrlIn = document.URL.split(“//”)[1]; //Get the URL. Cached URLs only have an IP address.if (UrlIn.toLowerCase() == UrlIn.toUpperCase()) //If these are the same. Then there is an IP address for the URL. This means we should hide it.
{
var table = document.getElementsByTagName(“table”); //Get a variable to the first table. This is the one we want to hide.
table[0].style.display = “none”; //Set it’s display to “none” to hide it.
}
//–>
</script>
This works because the label is the very first table on the cached page. Also, Google’s cache url is always an IP address.
Hi there,
I am a bit of a novice but how do I “put javascript” on the page?
Thanks,