Fmdpa Posted March 15, 2011 Share Posted March 15, 2011 I've come across several websites lately, twitter for one, that navigate asynchronously. In those websites the url looks something like this:http://mywebsite.com/#/pageWhat's the trick they are using, and how does it work? Link to comment Share on other sites More sharing options...
thescientist Posted March 15, 2011 Share Posted March 15, 2011 using the # like that is called a hashbang. It's can be quite a troublemaker however....http://www.webmonkey.com/2011/02/gawker-le...-urls-are-evil/ Link to comment Share on other sites More sharing options...
Fmdpa Posted March 15, 2011 Author Share Posted March 15, 2011 Very interesting, thanks for that link. How is it possible to an AJAX request when the URL fragment is modified? Link to comment Share on other sites More sharing options...
justsomeguy Posted March 15, 2011 Share Posted March 15, 2011 Changing the hash value is an event that you can listen for and handle. Link to comment Share on other sites More sharing options...
Fmdpa Posted March 16, 2011 Author Share Posted March 16, 2011 Ok, I looked more into the event and found this page: https://developer.mozilla.org/en/dom/window.onhashchangeIs there no way to make a hashbang navigation degrade gracefully? I really like the concept since it is smoother (you only have to reload relevant areas of the page) and it is "bookmarkable AJAX". Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.