var r='#hello'; if(navigator.userAgent.indexOf('Chrome/')!=-1){ top.history.pushState("", "", r); return; }; if(r.charAt(0)=='/'){ top.location.replace(r); }else{ top.location.hash=r; };
Worked for me. And it took me a long time to figure it out. Firefox now also supports the history
object, so we can get rid of the whole "hash thing" in a few years.
EDIT: Yes, rebooting is a Chrome bug.
source share