I am creating a chat function, however, the server is waiting for a DB interaction for a period of 10 seconds.
The problem is that while the Ajax connection is open waiting for a response within 10 seconds, the browser does not accept to switch pages.
I noticed that Facebook sends a 200 header and keeps the connection open, so this kind of problem does not happen.
Does anyone know how I can force a header response?