monkinetic weblog | redmonk.net

Since 1999, IX Ed.

prototype.js and &_=

Seth pointed me to prototype.js, a handy Javascript library for doing a variety of gee-wizzy things in webapps, one of which is performing a variety of useful AJAX functions. After fighting with it for way longer than necessary, I turned to:

tail -f /var/log/httpd/site_access_log

and after finding the request from my app I discovered that prototype.js was adding a parameter to the list I had provided for the remote call. The line in question is line 214(-ish) of the script, which looks like so:

if (parameters.length > 0) parameters += '&_=';

There are no comments explaining the additional parameter, or why it has no value, but FileMaker (collective groan) doesn’t like it one bit. I’ve commented out the line for now, at least until I’m given a very good reason for it being there.

Anyone have any ideas?

update: Markjuh had the answer - it was originally put there to work around a Safari bug, but is irrelevant now (so commenting it out is ok). Darn you Apple :-) !

2 Responses to “prototype.js and &_=”

  1. Seth (November 9th, 2005 at 7:46 am )

    As I said last night, I’m sure it’s there just so that you can detect where the request came from, on the server side.

    Web servers are supposed to ignore args they don’t understand.

    I hate filemaker.

  2. steve (November 9th, 2005 at 7:49 am )

    Heh. I know, I know. Actually, I believe that the issue is that FileMaker wants its ‘action’ parameter (-find, -edit, -new) to be LAST. And it’a annoyingly picky about it.

Leave a Reply

You must be logged in to post a comment.