Is it possible for a web-server to send more files than requested for, and have the browser accept them?
- by Osiris
I've created a basic web server for a school project, and it serves static content without a problem.
I thought of having the server parse all htm/html files for links to .js/.css/image files, and send these files to the client without these files being requested by the client later.
eg. The browser requests: index.htm
The server responds with intex.htm and image.jpg
I modified the server to send two distinct http responses for a "GET /index.html HTTP1.1" (one for the html page and one for the image), but the browser ended up requesting the image when it was good and ready.
Is there any way to bypass this? (use a multipart response, perhaps)
Will these files be accepted by most browsers, or will they be rejected for security reasons?