HomeToolsAbout

img HTML Tag

img tag src is a get request under the hood

A browser, if configured to load and display images, will first check whether it has the document matching URL in its own cache as fresh (by some caching criteria).

If not, it will send, via HTTP, a GET request to mysite.com for the resource /Page/1. What happens then is up to the server.

  • It may just pick up an image file from its resources and send it to the browser, or it may generate an image an send it, or it might (instead of or in addition to such things) store or update something in its database, or just a counter in a file, or whatever it has been programmed to do.

If the resource sent by the server is image data, the browser will try to display it. If it happens to be e.g. an HTML document, it will be discarded, and the browser will display the value of the alt attribute instead, or an icon of a broken image, or both.

AboutContact