javascript - Are browsers supposed to repeat a request if there is no server response after a while? -
i have opened asked question on sails project, might not related sails @ -- maybe related node.js, express.js or own code, wonder if has ever experienced this:
i have noticed browser requests "replayed" on server. in order test it, did this:
created simple controller action prints "this request" on server -- nothing else: doesn't send response browser.
when hit route, server console prints "this request", expected. keep waiting. browser keeps looping. after 2.5 minutes, "this request" printed again on server. expected behavior?
worst:
reload server. hit route. "this request" printed on console. ctrl+c server shut down , right away sails lift again while browser still looping. browser stop, , right after server lifted.... "this request" printed on console.
more info: using sails sockets-io , code has "reconnect" function:
io.socket.on('disconnect', function(){ socketcleanup(); io.socket.on('connect', function(){ socketconnect(); }); });
this used re-subscribe user socket special rooms ( io.socket.post(socketrooms... ) don't think responsible these "replays".
if of above not expected behavior, possible that, after upload cancelled, there trying replay upload, causing server crash?
i running sails on windows 7.
something never knew:
node.js page refresh calling resources twice?
could caused favicon???
it seems there known bug chrome regarding favicons causing duplicate requests: https://bugs.chromium.org/p/chromium/issues/detail?id=64810
however, doesn't seem related, since second request here happening 2.5 minutes later. have tested firefox , ie 9 , issue valid there.
Comments
Post a Comment