开发者

Caching absolute urls vs local urls

开发者 https://www.devze.com 2023-02-11 09:19 出处:网络
Is there any benefit to linking to images that are based on your url locally e.g. /images/myimage.jp开发者_Go百科g rather than http://www.google.co.uk/images/myimage.jpg In terms of performance bene

Is there any benefit to linking to images that are based on your url locally

e.g. /images/myimage.jp开发者_Go百科g rather than http://www.google.co.uk/images/myimage.jpg

In terms of performance benefits or is it all added to the same pot when executed by the browser?

Cheers Ian


No performance difference I'd say. Use relative URLs so that:

  1. When changing from your localhost to an external server, it doesn't break your links.
  2. It's marginally smaller. (hey, every byte counts right?)

In other words, for your convenience, use relative paths.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号