Saturday, May 07, 2005

Who's a clever monkey Google Web Accelerator meets WHAT WG

Well, apparently many on this thread via Signals vs Noise.

The accelerator scours a page and prefetches the content behind each link. This gives the illusion of pages loading faster (since they’ve already been pre-loaded behind the scenes). Here’s the problem: Google is essentially clicking every link on the page — including links like “delete this” or “cancel that.” And to make matters worse, Google ignores the Javascript confirmations. So, if you have a “Are you sure you want to delete this?” Javascript confirmation behind that “delete” link, Google ignores it and performs the action anyway.


Oh well, beaten to the punch.


Will Hayworth 06 May 05

Semi-stupid question: what about nofollow? I’ve looked in the Google docs and Mozilla specs and haven’t found anything about whether nofollowed links will be prefetched.




Nofollow.

Solved.

But... this can be extended further.

rel="nofollow admin edit"
If we had a set of well understood terms to denote functionality where people use hyperlinks as part of the UI, the rel attribute is perfectly capable of including metadata about the function of the link.

This neatly solves the issue being articulated here, from a post to the WHAT WG mailing list.
I was just thinking about the recent problems introduced by the Google
Web Accelerator following links that have side effects (the typical [delete this] stuff). One of the issues is
that doing the Right Thing means creating a form, and that effects the
UI, and of course the nesting form issue and all that. The Web Forms
spec deals with this some, with the action attribute for submit buttons
and some other details.

A related extension might be a method attribute to anchor tags. One
might expect a href="form?delete=10" method="POST"[delete this] /a to
do a post request to "form" with a request body of "delete=10". Or it
could do a post with an empty request body, but unfortunately a large
number of web frameworks ignore URL variables in post requests.
Added bonus? In theory, you could have your browser locate and color all of the functional hyperlinks with a little bit of CSS. You could extract a list of actions and what they do into a kind of psuedo RESTful web service description:

URL:
comment.php?action=delete&id=7
function:
delete, admin

So, now, developers could build a web services client based on your existing web application, HTTP GET, and HTTP Response codes! Gasp!

Of course, this won't scale well to methods that require you to return a result, but for simple actions that return a void this would work alright.

No, I'm not seriously suggesting this, it's the result of too little sleep and too much of a hangover.
Post a Comment