问题原文
原帖链接 · Rob Jay · CC BY-SA 4.0
I think my question is fairly simple, but being a bit of a newbie I don't know the answer and I haven't been able to find a satisfactory one searching online.
If I have a 25kb page (html) that displays a 75kb image, does that amount to 100k of data transferred from my web server/host to the user? Does it make any difference or does that 75k only "count" if the user actually downloads the image from the server? We're trying to compute resources needed for an image hosting service but the difference between 100k and 25k is obviously a significant one.
已采纳解答
原帖链接 · Trebor · CC BY-SA 4.0
It's not possible to view an image in a web page without downloading it. Your browser downloads every image to a local cache folder for every image you view in your browser. So, in answer to your question, you will always be downloading 100kb.
Now, if your goal is to offload your image downloads from your server, you should consider a Content Delivery Network or CDN. A CDN is a distributed network of servers optimized for hosting your images and other static files like your JavaScript and CSS.
When a client browser views your page, the browser downloads this image from the CDN, instead of your web server.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
