Remote <IMG SRC="..."> calls

software development

#1

Please advise on this basic question of HTML and Web functioning:

Should calls to from a remote host function the same as calls to the home host?

Specifically:

Given two sites, www.site1.com and www.site2.com (at different hosts in different cities), should the following HTML tags on www.site1.com function the same?


Or, does the call to the home host have an advantage (in terms of loading time) because the image file travels a shorter route over the network?

It seems like this should be obvious, but I can’t quite get my head around it, and I’d like other opinions.

–David B.
“greendavid”


#2

Hi David,

[quote]Or, does the call to the home host have an advantage (in
terms of loading time) because the image file travels a
shorter route over the network?

[/quote]

The difference would be that the user’s web browser is going to pull the image file from a different server. Their computer may need to hit DNS for that second server, which could slow things down (albeit pretty much imperceptibly, and only for the first such image).

It really depends on the speed of either server. Things will go faster from whichever server has a better network connection and less latency.

Plus, if both connections are roughly the same, it’s pretty much impossible to know which will be faster, as it’ll be different for different people in different locations.

  • Jeff @ DreamHost
  • DH Discussion Forum Admin

#3

Great! This confirms what I thought I knew.

The browser will reach out and grab the images, and any differences in loading time will be caused by the speeds of the individual servers and the Internet traffic at the time (which are unknowable in advance).

Thank you!

–David B.
“greendavid”