Re: [php-49] Absolute vs Relative Paths

From: Eric H.
Sent on: Monday, November 5, 2012 4:32 PM
Correct or at least that is where the original thread was intended to go. If everything you are linking to, is on your server, would or could you see any difference using relative paths vs absolute paths? (Relating to Performance)

-- Eric



On Mon, Nov 5, 2012 at 4:15 PM, Kris Craig <[address removed]> wrote:
So, wait.  Are we talking about the same resource on the same server, or are we talking about two separate resources being linked?  I thought this was about having a single file (like an image) hosted on your server, then linking to that from a webpage on the same server using either a relative URL or an absolute URL and measuring the performance difference between the two.

The stackoverflow post, however, is asking about whether it's faster to host a resource on a remote server or host it on the same server as the website.

--Kris


On Mon, Nov 5, 2012 at 4:10 PM, Mark Steudel <[address removed]> wrote:
This stackoverflow answer has some interesting information, don't know how valid it is since it's not footnoted ...
http://stackoverflow.com/a/5158862/212298


On Mon, Nov 5, 2012 at 3:56 PM, Joel Simpson <[address removed]> wrote:
I'm with you Kris, must be missing something.

are we talking about the difference between:

 src="/images/myimage.png"    vs    src="http://www.company.com/images/myimage.png"

If so, I think would be handled identically.  Both would end up fully resolved as "http://www.company.com/images/myimage.png" before being requested from the server.

Thanks,
Joel

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Joel Simpson | [address removed] 
cell: [masked]





On Mon, Nov 5, 2012 at 3:42 PM, Tim Piele <[address removed]> wrote:
No they have yo resolve on the server or else they won't make it to the browser.



Sent from my iPhone

On Nov 5, 2012, at 3:38 PM, Kris Craig <[address removed]> wrote:

Hmm I always thought resolution of relative paths happened at the browser level.  Or am I missing some context here?

--Kris


On Mon, Nov 5, 2012 at 3:02 PM, Jd Daniel <[address removed]> wrote:

Sounds legit

On Nov 5,[masked]:46 PM, "Eric Harris" <[address removed]> wrote:
Tim, that is half my job... don't know what I would do if I was not hotlinking every image I could get my hands on. ;)

I did not realize that absolute paths would require a new apache thread, but when I stop to think about that, it does make sense. So by using absolute paths on everything, images/page links/js includes, you are actually working your apache harder. Did I understand that correctly?

-- Eric

On Mon, Nov 5, 2012 at 2:37 PM, Tim Piele <[address removed]> wrote:
Quit hotlinking google images and that will fix it.




On Mon, Nov 5, 2012 at 2:35 PM, Garth Henson <[address removed]> wrote:
It is possible that this will make a difference, but it's generally negligible. Keep in mind that absolute links require an additional Apache process to resolve the domain name, etc. Relative links are handled in the same Apache process. So, if you have a TON of absolute URLs on your page, this could add up to a noticeable difference in latency to your page, but not to individual load times once the request has been made.

-GH


On Mon, Nov 5, 2012 at 2:20 PM, Eric Harris <[address removed]> wrote:
Hey Guys,

I am working on dealing with some slow loading images. I was suddenly struck with the thought of "Does absolute or relative paths, make a difference in load times?"

I did do some looking around, there are plenty of articles explaining the differences and such, but I could not find anything talking about load times, higher level pros/cons, or performance issues.

Anyone have an opinion on this topic?

Thanks,

-- Eric




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Eric Harris ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Eric Harris, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Garth Henson ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Garth Henson, visit his/her member profile





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Tim Piele ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Tim Piele, visit his/her member profile





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Eric Harris ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Eric Harris, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jd Daniel ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Jd Daniel, visit his/her member profile





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Kris Craig ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Kris Craig, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Tim Piele ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Tim Piele, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Joel Simpson ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Joel Simpson, visit his/her member profile



--
-----------------------------------------
Mark Steudel
P: [masked]
F: [masked]
[address removed]

. : Work : .
http://www.mindfulinteractive.com
 
. : Play : .
http://www.steudel.org/blog

. : LinkedIn : .
http://www.linkedin.com/in/steudel





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Mark Steudel ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Mark Steudel, visit his/her member profile





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Kris Craig ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Kris Craig, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy