Safari problem with Ajax.Request and simultaneous upload

67 views
Skip to first unread message

Christian

unread,
Jun 23, 2009, 3:47:44 AM6/23/09
to Prototype & script.aculo.us
Hi Everybody,

I have a problem with a simple Ajax.Request on Safari. Namely, I have
a HTML form for uploading a file and want to query the progess (for a
progress bar) from the server. For this, I call a Javascript function
in the form's onSubmit handler, which periodically performs an Ajax
Request (simple get), which is also initialized and loaded, but does
not complete (neither success nor failure) until the upload finishes.
My guess is, that Safari does not like to handle two requests (the
upload and the progress request) at the same time. Could this be true?

No problems with IE or FF on this.

Thanks.
Christian

Christian

unread,
Jun 23, 2009, 5:02:08 AM6/23/09
to Prototype & script.aculo.us
Hi Everybody,

I would like to add one more thing:
If I make the request 'asynchronous: false' the progress querying does
work,
however, then the file upload is stalled (with true, only the upload
works).

Thanks,
Christian

T.J. Crowder

unread,
Jun 23, 2009, 5:39:13 AM6/23/09
to Prototype & script.aculo.us
Hi Christian,

Most browsers, and most servers, place a limit on the number of
simultaneous connections between the same endpoints, and typically
that limit is two simultaneous connections. I don't immediately have
a reference for that, but if you search on "simultaneous HTTP
connection limit" or "concurrent HTTP connection limit" or some such,
you'll find info on it. Note, again, that this is done at the browser
level and also, sometimes, at the server level, and it varies by
vendor (and configuration).

What you're describing suggests that one end or the other is putting a
one connection limit on things rather that two. Frankly, I would have
thought it was at the server side (some sort of session thing, where
only one connection can be using a given session at a time), but if IE
and FF work but Safari doesn't, as you say that suggests it's Safari.
I'm surprised by that. Are you sure there isn't a third open
connection somewhere?

Or, of course, it could be something completely different related to
how Safari handles uploads. :-)

FWIW,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

T.J. Crowder

unread,
Jun 23, 2009, 5:50:59 AM6/23/09
to Prototype & script.aculo.us
Hi Christian,

Ah, hadn't seen your follow-up before posting my first reply.

How are you doing the upload? Hidden iframe submission or something?

-- T.J.
Reply all
Reply to author
Forward
0 new messages