0

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

Thanks in Advance !

Uday

1 Answer 1

1

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.

2
  • Thanks for the reply but but unfortunately it doesn’t support IE browser. Can you please suggest some solution for it?
    – Uday
    Jul 5, 2011 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. Jul 8, 2011 at 14:28

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