views:

367

answers:

2

I either dreamt about chrome (dev channel) implementing a way to update the address bar via javascript (the path, not domain) without reloading the page or they really have done this...

However...I can't find the article I think I read.

Am I crazy or is there a way to do this [in chrome]?

p.s. I'm not talking about window.location.hash (et al)...basically if the above exists the answer to this question will be untrue.

A: 

I was pretty sure the answer is no, but I scanned through the last month of dev-channel CLs to confirm — you cannot.

byoogle
+7  A: 

Found it!

Read all about it here: http://www.spoiledmilk.dk/blog/?p=1922

and the code:

window.history.pushState("object or string", "Title", "/new-url");
David Murdoch
Ah, the functionality is in WebKit and landed a few months ago <https://bugs.webkit.org/show_bug.cgi?id=36152>. Nice find!
byoogle