I'm curious to know if adding a tracking pixel (a transparent GIF with server logging) as a background-image in a linked stylesheet will have the same impact as if it were a regular <img>
on a webpage.
After conducting a quick test using Chrome's network inspector, it appears that the browser is fetching images from the local cache when hitting enter in the location bar. However, clicking reload prompts a request to the server resulting in a 304 status code. Additionally, using shift+reload will force the browser to fetch the image from the server, receiving 200 status codes.
Despite this, the behavior seems to be consistent for both <img>
elements on the page and background-images in the stylesheet, indicating that the behavior remains the same regardless of how the image is embedded.