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:
- When changing from your localhost to an external server, it doesn't break your links.
- It's marginally smaller. (hey, every byte counts right?)
In other words, for your convenience, use relative paths.
精彩评论