My question might sound stupid, but I just wanted to be sure:
- Is it possible to send an HTTP response before having the request for that resource?
Say for example you have an HTML page index.html
that only shows a picture called img.jpg
.
Now, if your server knows that a visitor will request the HTML file and then the jpg image every time:
Would it be possible for the server to send the image just after the HTML file to save time?
I know that HTTP is a synchronous protocol, so in theory it should not work, but I just wanted someone to confirm it (or not).