Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm curious what the other solutions are then. The only one I can think of is the History.pushState, and that's only supported in newer browsers.

Let's say I'm writing a web based word processor, and a user clicks on a document. I want the URL to be a reference to that specific document. The only way to change the URL to be specific without requiring a whole-page refresh is to use the hashbang syntax.




> I'm curious what the other solutions are then.

The hash without the bang. It's only been done for about 10 years. You can put whatever you want after the hash. It's up to your application to decide the meaning of it.

For an example, see the OSX SDK documentations: http://developer.apple.com/library/mac/#documentation/Cocoa/...


well it looks like they are emitting crap like this

<a rel="nofollow" href="/#!about/" title="Click here to go to About">About</a>

without the hashbang shit, that's a nice normal link that any normal http client can work with. you can still layer on ajax to bind to that link, and use the fragment for the benefit of browser state and user interaction should you think that is a wise thing.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: