301 Meta Refresh Redirects: How Google and Yahoo Sees It
Normally the best practice for 301/302 (permanent/temporary) redirects are through your web server. However, you can only do this if you own your own domain. So what happens when you’re using a free webpage service such as Blogger, WordPress and Typepad, and you want to do 301 redirects to your new website?
If you’re thinking of doing Javascript redirects, this isn’t highly recommended as Google and Yahoo web crawlers won’t be able to follow the redirects, which will affect the destination’s ranking and indexing.
Although not the best, your next best bet is using the meta refresh tag to do your redirections. It seems that Google recognises meta redirects and Googlebot should be able to crawl to the new page, according to Google’s Webmaster Help Center.
Yahoo’s Search Help also seems to recognise meta redirects and the crawler will be able to follow the redirects.
It appears that a meta refresh delay of 0 or 1 second will be considered as a 301 redirect and anything longer is considered a 302.
I will try to post a javascript solution that will be able to handle redirects from your old website to appropriate pages of your new website this weekend.
font control
I was bored so I decided to write a font control using javascript. Try it here.
I’ve added the controls on the top of the page as well as in my javascript widget.
Enjoy :)
[edit date="09-08-07"]
Added new buttons I made.
[/edit]
JavaScript Inheritance
Found some really useful tutorials on how to use inheritance in JavaScript. This is pretty new to me as I haven’t learnt JavaScript formally but through the Internet. <3 Internet
Anyways, I’m working on an automated HTML generator using JavaScript since I don’t have access to server side stuff. Gosh it gets complicated doing it all on client side!
flip text
Some cool javascript I found on the web. Flips whatever text you give it upside-down and reversed!
Rendering table in IE using DOM
So I thought I’d share with people who would be interested in these sort of things (programming), especially dealing with JavaScript’s Document Object Model (DOM). I came across an annoying bug that has bugged me for the past few days which turned out to be quite simple.
First take a look at the following JavaScript:
var container = document.createElement(“div”);
var table = document.createElement(“table”);
var tr = document.createElement(“tr”);
var td = document.createElement(“td”);
var text = document.createTextNode(“This is a test.”);
td.appendChild(text);
tr.appendChild(td);
table.appendChild(tr);
container.appendChild(table);
document.body.appendChild(container);
When you go alert(container.innerHTML), you will see that the DOM is created correctly but for some reason it is not showing up. Even by inspecting the DOM using IE7′s add-on, IE Developer Toolbar, you will see that the DOM is constructed correctly. When running this on Firefox, the code seems to work the way you want it to. So what the heck is the problem?!?
Well after many hours of googling, I came across an article that helped me solve my problem. Apparently, a tbody element is required within the table tag which is interesting because according to the HTML4 Standard, a tbody isn’t required within a table. Adding a couple of lines will fix this rendering problem:
var table = document.createElement(“table”);
var tbody = document.createElement(“tbody”); <–
var container = document.createElement(“div”);
var tr = document.createElement(“tr”);
var td = document.createElement(“td”);
var text = document.createTextNode(“This is a test.”);
td.appendChild(text);
tr.appendChild(td);
tbody.appendChild(tr); <–
table.appendChild(tbody); <–
container.appendChild(table);
document.body.appendChild(container);
Hopefully you won’t spend as much time as me trying to figure out this problem.


