..oO(Mike J.S.)
Quote:
If there are 20 requests for the same image in a webpage, are all 20
instances treated as a single request (load and rendering-wise)? |
Depends on the cacheability of the image. 20 references to an image in a
page always mean 20 requests. The only question is who will answer them
and if they will reach the server at all.
It's quite possible that the browser only sends a single request and
stores the image in its cache (if it's not there already) until it
expires. Then all remaining references in the page would not lead to
additional server requests, but would be served directly from the
browser cache.
Another possibility is that the image is cacheable, but the server
requires the browser to always check if the resource was changed on the
server. This would lead to 20 server requests, but only the first one
(if any) would actually fetch the image, all others would be answered
with the HTTP status code 304 ("Not Modified").
Micha