HTTP Long Polling - Timeout best practice
<p>I play with Javascript AJAX and long-polling.
Try to find best value for server response timeout.</p>
<p>I read many docs but couldn't find a detailed explanation for timeout.</p>
<p>Someone choose 20 secs, other 30 secs...</p>
<p>I use logic like on diagram
<a href="https://i.stack.imgur.com/Iinn9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Iinn9.jpg" alt="HTTP Diagram" /></a></p>
<p>How can I choose better value for timeout?
Can I use 5 minutes?
Is it normal practice?</p>
<p>PS: Possible Ajax client internet connections: Ethernet RJ-45, WiFi, 3G, 4G, also, with NAT, Proxy.</p>
<p>I worry about connection can be dropped by third party in some cases by long timeout.</p>