If we are allowed to change the browsers, I'd rather change them to have a JavaScript API that lets you push a JavaScript object onto the back history. A property on the object e.g. "onback" would point to a function which is called to restore that back state.
For bookmarking, I'd go for an "onbookmark" event, set on the document. When onbookmark is fired, the JavaScript event handler would override the page's default bookmark URL, generating an application-specific URL.