Steve Jenson's blog

37Signals and the Google Web Accelerator

37Signals and the Google Web Accelerator

So, the Google Web Accelerator prefetches links. Not a big surprise. Unless clicking on a link destroys or alters data and you can't figure out why your stuff is gone. This is not actually the web accelerators fault.

Now, good natured engineers worldwide are asking: "Why isn't POST good enough for you?"

Actually, some budding RESTafarians are not quite asking, they are calling you out, in their Napoleon Dynamite way, "Goll, using GET for non-idempotent requests. Idiot! Read RFC 2616, it's only like the sweetest RFC ever."

Ahem.

So, lots of web developer-types don't like POST for one simple reason: because they force you to use ugly form submission buttons. Ugly? We are engineers, if it's not ugly, it probably doesn't even work, right?

Visual aesthetics have again gotten in the way of clean engineering practices. Hell, at Blogger we even have some non-idempotent requests behind GET oursleves. So how do we keep things like the Google Web Accelerator, various web proxies, and all of the nasties out there from hurting us? We use JavaScript! But I don't mean just in onclicks, which stuff that doesn't speak JavaScript will ignore. You'll see lots of javascript:void(0) URIs floating around. See, if your hyperlink isn't a URI, there's nothing to fetch. If nothing gets fetched, nothing gets destroyed.

We know it's bad. We do it anyway. We just try to be, you know, savvy about it. Sorry this is so much trouble. It really is a big hassle, and it really is the browser's fault (yet again).

Think of it this way. It's dangerous; like pausing a running program, changing some of it's instructions, and resuming program execution. But if you couldn't do that then you would never be able to set a breakpoint in a debugger and then you would have to use printf or log4j for all of your debugging. Heh, I bet you do, anyway, don't you?

Hope that helps.

(If you think this tone is too personal, then that's becuase this is not written specifically to the 37Signals folks, who I think work hard and make neat stuff, it's actually written to you.)

# — 07 May, 2005