开发者

Catch back-button (keep one history entry, no visible hash-tags)

We are currently building an advanced JS/AJAX-based service, and allowing the back-button to function in a meaningful way is obviously important. I've looked around some, and been in-contact with iframe-hash/anchor-solutions before, but the ones I've seen and found are all based on the idea of going back/forwards in a page structure. What I'm looking for is to find a way to bind the back-button to act as an alternative for "clos开发者_JS百科e" / "cancel".

The solution to what I'm looking for is simple, to almost always keep exactly one additional back-history entry (except for when "we" decide the user is at the "start"), without showing a hash-tag in the location bar.

I did have a try at implementing it myself, a hidden iframe for which I change the hash, worked well, in all browsers but IE, it refused to update the hash-tag for me when pressing back. Are there any solutions out there that solve this problem (trap back-button, no visible hash-tag)? Or any simple cross-browser solutions for dealing with hidden iframe hashtags?


Sorry for the partial answer, but this looks promising: http://code.google.com/p/reallysimplehistory/

I'd like to keep informed of your progress on this, it's a useful thing if it's practical to implement.

Dan

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜