Handling 404 Errors in Javascript 06 Feb, 2013 Handling 404 Errors in Javascript

Migrating between hosting and blogging solutions can cause headaches. Now that I’ve moved to an Amazon S3 hosted static website, I needed an intelligent way to handle certain features like tags and categories that I had with the blogger.com and Wordpress hosted site, without the need to host a server.

JavaScript to the rescue!

  • I first identified the specific causes of problem using the crawl statistics from Google’s Webmasters tool.
  • I then crafted JavaScript specifically tailored for these situations.
  • Put that into my 404.html.

This solution is specific to my use case, but you can get the idea.



Tags  ·   404  ·   Not found  ·   Javascript  ·   Show Comments ▾


     
Original design for Tumblr crafted by Prashanth Kamalakanthan.
Adapted for Tumblr & Jekyll by Sai Charan. Customized theme available on Github.

Sai Charan's blog by Sai Charan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Creative Commons License