ack
ack

Reputation: 14935

Url format affects performance/caching?

In terms of performance (load times or caching implications) is there a difference between:

<img src='http://www.example.com/img/logo.png'> <!-- Absolute path + Domain -->
<img src='/img/logo.png'>                       <!-- Absolute path -->
<img src='../logo.png'>                         <!-- Relative path -->

I vaguely recall that the first one is viewed as an external link and not cached by the browser?

Upvotes: 0

Views: 52

Answers (1)

Pekka
Pekka

Reputation: 449485

It's as @Nick says in the comment. A HTTP request will always contain a full path. Whether the source path is relative or absolute is completely meaningless for performance.

Upvotes: 2

Related Questions