开发者

Caching absolute urls vs local urls

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜