steps
steps

Reputation: 804

How do I create dynamically loaded pages URL?

I'm noticing many websites with this AJAX loaded URL structure "#!", like twitter: (https://twitter.com/#!/apolinariosteps) but I couldn't find it documented (I didn't know what to search)

I'm not really sure if that is the solution (but I still wanna know how to do this), what I want is that when I load some content with Jquery, this cause a URL change somehow so I could share the page with the specific content loaded link.

Thanks in advance

Upvotes: 3

Views: 186

Answers (1)

devstruck
devstruck

Reputation: 1507

The reload-less URL change exists natively in newer browsers through browser history object and can be easily polyfilled with balupton's history.js. The basic syntax will be history.pushState(stateObject, title, URL).

Upvotes: 2

Related Questions