I’m using Ben Almans plugin for hash change tracking:
http://benalman.com/projects/jquery-hashchange-plugin/
Also I’ve modified my web configuration so that when you enter www.mysite.com/test1, PHP grabs string with test1 value, forwards it to JavaScript. JavaScript sends it through AJAX to sever side script and brings back test1 page.
And after all user writing www.mysite.com/test1 in address bar gets the test1 page.
Everything is OK.
Now. If you enter www.mysite.com, you see only index page, and there is a link to test1 page.
If you press it, it makes address www.mysite.com/#test1 and because of that # hash change plug-in can bring you back using AJAX when you press back button.
What I want is to have such hash change plug-in or method or system which will not need those # signs. Cause I want the user to see the same clean address like www.mysite.com/test1.
Is that possible?
That’s not possible. The
#is the prefix for the hash part of the location. Hashes are usually not sent to the server, and thus, changing the hash won’t cause a page request.When you omit the sharp (that’s the name of the
#character), a page request will initiate.If you want SEO URL’s, I recommend to use this”
This will bind an
onclickat each<a>element in the document, with ahrefattribute which starts with the base url.