: Is it possible for a web-server to send more files than requested for, and have the browser accept them? I've created a basic web server for a school project, and it serves static content
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?
More posts by @Michele947
1 Comments
Sorted by latest first Latest Oldest Best
I've found this document, but I've never tried to deal with it.
If your goal is to minimize requests, you can somehow modify your pages (javascripts and stylesheets may be easyly included right into your html, also you can even embed base64-encoded images usind data: URI scheme, like it's described here)
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.