[nycphp-talk] Deep Linking with Ajax?
Chris Shiflett
shiflett at php.net
Thu Dec 14 12:11:44 EST 2006
Stephen Musgrave wrote:
> I have a designer who would like to have links on the subnav to
> NOT refresh the page.
Ugh. Why not? Navigation links go to different pages (with presumably
different content), therefore the URL should change. I'm sure you can
manage to use Ajax and other client-side technologies to mimic going to
a different page (changing the URL and such), but this is a perfect
example of misusing Ajax.
Just so it doesn't sound like I'm anti-Ajax, there are situations where
it can be useful. One example is a comment form with a preview. To
display the preview, you could use Ajax to exchange the minimum amount
of information with the server as necessary (to process the comment
using whatever filtering/formatting is already in place on the server)
and display the preview on the current page. The URL would not change,
but from a user's perspective, the page hasn't changed either, so it's OK.
That's my opinion. :-)
Chris
--
Chris Shiflett
http://shiflett.org/
More information about the talk
mailing list