Blocking requests with a weak internet connection

I encountered an issue where the webSocket cannot send a request/receive a response because it is busy loading resources, such as a background image. So, until the background image is loaded, the websocket will be queued.

What can be done about this? Are there any solutions?