Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ajax navigation without #!

I have noticed that sites like http://hypem.com which is a full ajax site have now managed to scrap their #! ajax urls but maintained a full ajax site. How is this possible?

like image 955
wilsonpage Avatar asked Jun 22 '11 10:06

wilsonpage


2 Answers

You can do this with history.pushState, only in decent browsers though ;)

https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history

Here's a jQuery plugin with a fallback for older browsers to a hashed URL: http://plugins.jquery.com/project/history-js

like image 146
fijter Avatar answered Oct 21 '22 08:10

fijter


Some modern browsers support history.pushState().

However, if you want to support older browsers that are still popular, you should use the hash fallback.

like image 30
alex Avatar answered Oct 21 '22 08:10

alex