{"id":3355,"date":"2014-03-23T11:23:06","date_gmt":"2014-03-23T11:23:06","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/how-do-i-change-the-address-bar-when-i-make-an-ajax-request-collection-of-common-programming-errors\/"},"modified":"2014-03-23T11:23:06","modified_gmt":"2014-03-23T11:23:06","slug":"how-do-i-change-the-address-bar-when-i-make-an-ajax-request-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/how-do-i-change-the-address-bar-when-i-make-an-ajax-request-collection-of-common-programming-errors\/","title":{"rendered":"How do I change the address bar when I make an Ajax request?-Collection of common programming errors"},"content":{"rendered":"<p>I have created a website that intensively use Ajax to load its contents. I want the pages I select to load on AJAX but at the same time the URL also changes without reloading the whole page content. How would I achieve that? I&#8217;ve googled already but my search did not yield any results.<\/p>\n<p>Let&#8217;s say I have this page:<\/p>\n<pre><code>\n\n\n\n\n    \n    Insert title here\n    \n\n\n    <\/code><\/pre>\n<h5><code>Struts Jquery Ajax Integration<\/code><\/h5>\n<pre> \n\n    \n    Please Turn On Javascript to make the full use of this site\n\n    <\/pre>\n<h4><code>Choose A task<\/code><\/h4>\n<pre>\n    <\/pre>\n<ul>\n<li><code>Ajax Validation<\/code><\/li>\n<\/ul>\n<pre>\n\n    \n        <\/pre>\n<h6><code>Play A Music while You Navigate<\/code><\/h6>\n<pre>\n        Your browser does not support the\n            audio element.\n        \n    \n\n\n<\/pre>\n<p><code>I clicked the Ajax Validation link. it will not reload the page but however the url would be something like this:<\/code><\/p>\n<pre><code><code>localhost:8090\/AppName\/ajaxvalidation.jsp\n<\/code><\/code><\/pre>\n<p>or this:<\/p>\n<pre><code> localhost:8090\/AppName\/ajaxvalidation.action\n<\/code><\/pre>\n<p>How would I achieve such a goal?<\/p>\n<p><em>Note that I am using this plugin: struts2-jquery<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have created a website that intensively use Ajax to load its contents. I want the pages I select to load on AJAX but at the same time the URL also changes without reloading the whole page content. How would I achieve that? I&#8217;ve googled already but my search did not yield any results. Let&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3355","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3355"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3355\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}