ajaxxmlhttprequestlimitpollingrate

Do browsers limit AJAX polling rate? What is the limit?


I just read that some browsers would prevent HTTP polling (I guess by limiting the rate of requests)...

From https://github.com/sstrigler/JSJaC:

Note: As security restrictions of most modern browsers prevent HTTP Polling from being usable anymore this module is disabled by default now. If you want to compile it in use 'make polling'.

This could explain some misbehavior of some of my JavaScripts (sometimes requests are just not sent or retried, even if they were actually successful). But I couldn't find further information on details..

Questions

Thanks for your help...

Stefan


Solution

  • Stefan, quick answers below:

    -if it's "max. number of requests n per x seconds", what are the usual/default settings for x and n? This sounds more like a server restriction. The browser ones usually sound like: -"the maximum requests for the same hostname is x" -"the maximum connections for ANY hostname is y"

    -Is there any way good resource for this? http://www.browserscope.org/?category=network (also hover over table headers to see what is measured) http://www.stevesouders.com/blog/2008/03/20/roundup-on-parallel-connections

    -Any way to detect if a request has been "delayed" or "rejected" because of a rate limit? You could look at the http headers for "Connection: close" to detect server restrictions but I am not aware of being able in JavaScript to read settings from so many browsers in a consistent, browser-independent way. (For Firefox, you could read this http://support.mozilla.org/en-US/questions/746848)

    Hope this quick answer helps?