I want to add some items in history using javascript? Is there any way to do it?

Thanks in Advance !

Uday

link|improve this question
feedback

closed as not a real question by SvenW, Zoredache, theotherreceive, Chopper3 Jun 30 '11 at 10:29

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. See the FAQ for guidance on how to improve it.

1 Answer

I believe what you are looking for is:

history.pushState( stateObj, title, url );

And definitely read: https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history

History states definitely still have limitations in terms of cross-browser compatibility, so if you are looking to solve for old versions of IE, etc... you may need to just update the #hashmark on the url.

link|improve this answer
Thanks for the reply but but unfortunately it doesn’t support IE browser. Can you please suggest some solution for it? – Uday Jul 5 '11 at 11:47
If using jQuery is an option, I highly recommend this plugin: benalman.com/projects/jquery-hashchange-plugin It focuses on using the history api, but with jQuery's support provides a cross-browser solution. – Action Jake Jul 8 '11 at 14:28
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.