Forums Register Login

why does jsf.js use a synchronous req here

+Pie Number of slices to send: Send
While checking the console on ajax req I was surprised that I had that warning message in the dev tool console:



After investigation it seems like this is the cause of this :



Why is it probably the only correct way ?? And when is this used ?

source : http://grepcode.com/file/repo1.maven.org/maven2/com.sun.faces/jsf-impl/2.2.12/META-INF/resources/javax.faces/jsf-uncompressed.js?av=f
+Pie Number of slices to send: Send
Actually, on casual reading of that code I'm not sure that it is a synchronous request. The comments could possibly be out of date.

There are 2 reasons why synchronous requests might be justified:

1. On the server side. If the request isn't idempotent, then having other requests serviced at the same time could scramble the results.

2. On the client side. If the xhs manager gets confused as to which received response it gets matches which request. Since web servers handle requests asynchronously (and often in parallel), it's possible for request A to precede request B, but get back request B's response before you got back the response for request A.
straws are for suckers. tiny ads are for attractive people.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1018 times.
Similar Threads
What is "asynchronous" in AJAX?
Cancel Ajax previous request
Couldn't find error in this code
POST only sending first line of data
Dynamic marquee
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 07:49:46.