[whatwg] Updating Location Bar for RPC Type Apps
Jim Ley
jim.ley at gmail.com
Sat Apr 23 12:18:53 PDT 2005
On 4/22/05, Olav Junker Kjær <olav at olav.dk> wrote:
> Brad Neuberg wrote:
> >
> > Whenever I implement a DHTML (Ajax?) type app that needs to talk to the
> > server without refreshing the client, such as through a hidden iframe or
> > an XmlHttpRequest object, I always wish that I could update the window
> > location bar to show a bookmarkable and copyable URL, but update it in
> > such a way that it _doesn't_ refresh the browser or change it's location
> > (window.location.href changes the location).
>
> You can do this by changing the fragment, e.g. set window.location to:
> http://www.rojo.com/manage-subscriptions#sortby=TAG"
> This is useful for changing to a new bookmarkable state on the client
> side without reloading the page.
Hmm, but then you need client-side intelligence to test the hash
portion of the string, and then make subsequent requests to get the
relevant data from the server. The original suggestion is much more
powerful than that, as it allows the server to respond directly to a
request.
I've certainly wanted this, a sensible compromise is to only be able
to set the query portion of the url.
Jim.
More information about the whatwg
mailing list