{"id":150,"date":"2007-01-03T01:01:45","date_gmt":"2007-01-03T07:01:45","guid":{"rendered":"http:\/\/www.khaitan.org\/blog\/2007\/01\/the-rise-of-ajax-and-the-death-of-http-404\/"},"modified":"2007-01-03T01:01:45","modified_gmt":"2007-01-03T07:01:45","slug":"the-rise-of-ajax-and-the-death-of-http-404","status":"publish","type":"post","link":"https:\/\/www.khaitan.org\/blog\/2007\/01\/the-rise-of-ajax-and-the-death-of-http-404\/","title":{"rendered":"The rise of Ajax and the death of HTTP 404"},"content":{"rendered":"<p>In classic web application models, the user-agent sits between the user and the the webserver &#8212; The user-agent does not apply any business logic other than rendering the pages. With the rise of Ajax, server-side logic is moving to client, so much so that the conventional 3-tier web model is being challenged in a way that the whole presentation layer and the controller is being touted to move to the browser.<br \/>\nSo, what happens to the veritable 404 (and other related HTTP error codes and pages)? In classic web applications, if you have a &#8220;Page Not Found&#8221; situation, you as a user &#8220;see&#8221; the associated 404 page (e.g. <a href=\"http:\/\/www.google.com\/non_existing_page.html\">http:\/\/www.google.com\/non_existing_page.html<\/a>). However, with Ajax, it&#8217;s the Ajax engine which is suppose to capture the 404. The user sees a \u201cpretty message\u201d while the Ajax engine (or the library running the engine) captures the 404. For example, in scriptaculous\u2019 javascript library, <a href=\"http:\/\/wiki.script.aculo.us\/scriptaculous\/show\/Ajax.Request\">on404<\/a> is the callback handler for HTTP 404s returned from the server.<br \/>\nReproducing and annotating Jesse James Garrett&#8217;s diagram from the <a href=\"http:\/\/www.adaptivepath.com\/publications\/essays\/archives\/000385.php\">original Ajax article<\/a> comparing classic and Ajax application model further crystallizes this thought that we need a redefined set of HTTP codes to support the Ajax application model.<br \/>\n<img loading=\"lazy\" alt=\"rise_of_ajax_death_of_http_404.PNG\" src=\"http:\/\/www.khaitan.org\/blog\/mt\/archives\/rise_of_ajax_death_of_http_404.PNG\" width=\"522\" height=\"439\" \/><br \/>\n<em><sup>Image modified without explicit permission of <a href=\"http:\/\/www.adaptivepath.com\">Adaptive Path.<\/a> Are they cool?<\/sup><\/em><br \/>\n<strong>Tags:<\/strong> <a href=\"http:\/\/technorati.com\/tag\/ajax\" rel=\"tag\">Ajax<\/a>, <a href=\"http:\/\/technorati.com\/tag\/web+2.0\" rel=\"tag\">Web 2.0<\/a>, <a href=\"http:\/\/technorati.com\/tag\/scriptaculous\" rel=\"tag\">scriptaculous<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In classic web application models, the user-agent sits between the user and the the webserver &#8212; The user-agent does not apply any business logic other than rendering the pages. With the rise of Ajax, server-side logic is moving to client, so much so that the conventional 3-tier web model is being challenged in a way [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[58,57,60,9,21,59],"tags":[],"_links":{"self":[{"href":"https:\/\/www.khaitan.org\/blog\/wp-json\/wp\/v2\/posts\/150"}],"collection":[{"href":"https:\/\/www.khaitan.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.khaitan.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.khaitan.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.khaitan.org\/blog\/wp-json\/wp\/v2\/comments?post=150"}],"version-history":[{"count":0,"href":"https:\/\/www.khaitan.org\/blog\/wp-json\/wp\/v2\/posts\/150\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.khaitan.org\/blog\/wp-json\/wp\/v2\/media?parent=150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.khaitan.org\/blog\/wp-json\/wp\/v2\/categories?post=150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.khaitan.org\/blog\/wp-json\/wp\/v2\/tags?post=150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}