Catch 404 A jQuery And CSS3 Modal Plugin For Handling Broken Links Elegantly

  • Catch 404 A jQuery And CSS3 Modal Plugin For Handling Broken Links Elegantly, 5.0 out of 5 based on 1 rating catch 404
    The basic idea behind Catch404 is that you perform an Ajax query for a URL and handle the response provided accordingly, so if its a 404 error, we handle this error specifically. Now because cross-domain 404 handling with jQuery is something that has often been problematic to correctly implement, achieving this isn’t as straight-forward as it should be.

    So how does this plugin work

    Instead, the plugin uses a neat trick using the Yahoo YQL Engine to access the URL for us which returns a HTML string (local URLs don’t require this hack) – thanks to James Padolsey and Christian Heillman for their work in this area. Depending on the contents of this string response, we’re then able to handle the error from the same page the user tried clicking out from. In my plugin, a modal window is used to render the error message and it’s here that you’re able to define whatever message, links or tips that you would like to offer your users regarding the 404. This offers a much better user experience than traditional 404 handling because rather than taking them somewhere with no content, you’ve now got the option to either present them with an alternative mirror or advice through the modal window.

          

    Author:Addy Osmani
    Download: from here
    Subscribe to Site Help Web Resources Feed

    GD Star Rating
    loading…

    August 8th, 2010 | Blue | 3 Comments | Tags: , , ,

About The Author

Steve

Hi I am a webdeveloper based in Brisbane, Australia. Fanatical about the internet and website code and development. Hence this site, a showcase resource site for you to get the latest greatest code , scripts , apps and demos all from the one venue.

3 Responses and Counting...

Leave a Reply

* Name, Email, and Comment are Required