in reply to Re^2: CGI and image
in thread CGI and image
Technically, it could be one HTTP request. He could convert the image data to base64 and use a data uri.
That won't work with all browsers. See http://caniuse.com/datauri. (Don't think that people have stopped using ancient IEs. And don't think that the browsers listed there are ALL browsers that exist.) Plus, it wastes a lot of bandwitdh, especially if the image is static. Using a classic HTTP(S) URL for the image allows the browser and all proxies between browser and server to cache the image, so it is transmitted only once, whereas the data URL "solution" sends the image for every request, with an additional overhead of 33% due to base64 encoding.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: CGI and image
by kschwab (Vicar) on Dec 17, 2016 at 15:04 UTC |