On Jun 7, Henk Boom wrote: > > I can see now that this probably isn't going to work as a solution. > > Just FYI though, there's a common trick for handling this kind of > on-click event which is to have the url point to #goto-car or > something similar and handle it as a response to that instead, this > way it "just works" when the user opens the link in a new > window/tab. AFAIK Facebook/twitter/Google Reader do something like > this, though they use it for triggering ajax page reloads rather > than for redirects.
What ajax pages do (AFAICT), is basically push "somepage#some-data" down your history, which makes it possible to use the back button to do things like jump back from a mail search view back to the default mailbox view. It also makes it possible to save a url that will make it go to a specific email or search etc. (For example, with FF's feature of saving the state when you exit, it means that next time you start it you will get to the same state you were at.) I've looked at doing it for the searches, but there are some hairy issues (as usual with browser compatibility) to solve -- so it's either deal with these issues, or drag in another javascript library into plt just to do that. Now, even if that's done, there is still a problem with loading the index file: if I middle-click a link to get it in a new tab, most browsers will reload the JS index in that tab and then proceed to load the hash chunk with the rest of the data. This means that the time from clicking a link to getting the page becomes extremely slow. (BTW, last time I looked, only IE was caching the index vector so openning the search page in a second tab did not have a delay. But to compensate for that, it took longer than other browsers to load the index...) BTW, I should have mentioned trampoline pages -- those are similar in nature, and suffer from similar issues (maybe more severe). -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! _________________________________________________ For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-dev