IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New I don't understand what this is saying about links
http://wiki.dreamhos...erformance#Markup
Use absolute or relative paths
When linking to local resources (images, video, JavaScript, etc.) within your documents, use either absolute (also called relative from root) or relative paths. Using a remote path (such as a URL) will cause an additional and unnecessary HTTP request.

Every link in an HTML page is a URL. What is this paragraph saying?
--

Drew
New "For best performance, don't hit remote sites." Perhaps?
New "When linking to local resources"
They're specifically talking about local resources, and not using URLs, but instead either absolute or relative paths. Both of which, I believe, are URLs. The only two alternatives for URLs, in fact.
--

Drew
New No doubt it's worded very poorly.
I think they're saying - "Make sure you always use local URL paths for local resources. If you refer to a resource on your server via an external URL [why one would want to do that, I don't know], you're going to trigger an HTTP request which will decrease your web page performance."

URLs are "uniform resource locations" and can refer to local or remote resources. That's why they're "uniform". At least that's my understanding.

I wouldn't think too hard about this. It's just poorly worded.

I think, anyway. ;-)

HTH a bit.

Cheers,
Scott.
New Have to test it...
... but it sounds inaccurate.

Both root relative and relative paths just prepend the current transport://host/ information to the URL, so unless they differ (https vs. http, etc) the browser should be able to pipeline over http 1.1 same as anything else. Either way, the browser has to hit the remote server in some fashion to get the resource. It's not as if it's located locally on the user's machine.

Reading it again, actually I think that's what they're saying. How is the user supposed to have a resource locally? That makes no sense, unless they're talking about performance packs such as are used by some HTML games (download a bunch of images, tell the server to point locally to the images and save the server bandwidth). This technique isn't terribly useful for a blog though.

However, if you don't use a transport of file://, it's still going to hit the remote server.

This doesn't make any sense on multiple levels.

Using root relative and relative paths isn't a performance best practice to my knowledge. It's a maintenance and interoperability best practice.
Regards,
-scott
Welcome to Rivendell, Mr. Anderson.
Expand Edited by malraux Dec. 26, 2011, 08:30:48 PM EST
New I'd go with ^^^HIS EXPLANATION
New Someone is simply wrong.
It sounds like someone with not enough knowledge is trying to describe something they don't know they don't understand.

Iincluding a hostname in a URL to the same site is simply semantically unnecessary which is why people say not to do it. It is possible that it changes the order some browsers fetch resources, but I've never heard of that elsewhere, so it's likely to be an abberation on some specific older versions.

Wade.
Static Scribblings http://staticsan.blogspot.com/
New That's what I suspected
Like Scott said, it helps with maintenance, but I've never heard of a performance hit.
--

Drew
New I can see only one obscure case where that is true
When writing something like PHP you can add other documents to your PHP script using commands like include. It is possible to use URLs, and using a URL for something that is a local file would generate extra HTTP requests. However, that is the sort of thing that involves being intentionally stupid to end up there.

Jay
New Okay, that makes sense
And yes, "intentional stupidity" about sums it up.
--

Drew
     I don't understand what this is saying about links - (drook) - (9)
         "For best performance, don't hit remote sites." Perhaps? -NT - (Another Scott) - (2)
             "When linking to local resources" - (drook) - (1)
                 No doubt it's worded very poorly. - (Another Scott)
         Have to test it... - (malraux) - (1)
             I'd go with ^^^HIS EXPLANATION -NT - (folkert)
         Someone is simply wrong. - (static) - (1)
             That's what I suspected - (drook)
         I can see only one obscure case where that is true - (jay) - (1)
             Okay, that makes sense - (drook)

No such job.
96 ms