HTTP Response before Request

A recent post by Jacques Mattheij, referencing your very question, claims that although HTTP was designed as a synchronous protocol, the implementation was not. In practise the browser (he doesn’t specify which exactly) accepts answers to requests have not been sent yet.

On the other hand, if you are looking to something less hacky, you could have a look at :

  • push techniques that allows the server to send content to the browser. The modern implementation that replace long-polling/Comet “hacks” are the websockets. You may want to have a look at socket.io also.
  • Alternatively you may want to have a look at client-side routing. Some implementations combine this with caching techniques (like in derby.js I believe).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)