I'm working on a URL-scanning Chrome extension. In the content script (run at document_start), I send a URL to my websocket server and wait for a returned verdict. However, websocket messages are delivered asynchronously, thus the page may be already loaded and displayed, especially if the network connection is slow.
Can I call websockets in a synchronous way somehow, and allow page loading only after an acceptable response is received?
Per woxxom's comment, it is not possible to use websockets in a synchronous manner.