Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

difference between relative path and full URL

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  how add Dreamweaver in 'Edit with.. ' list in IE?  
Author Message
shawn3

External


Since: Dec 08, 2004
Posts: 7



(Msg. 1) Posted: Tue Jan 11, 2005 11:46 am
Post subject: difference between relative path and full URL
Archived from groups: alt>www>webmaster (more info?)

Hi,

My question is does anyone know the difference between specifying a relative
path such as
<img src="images/myimg.gif"> and full URL
<img src="http://mysite.com/images/myimg.gif">?

Does the second one issue an additional http request? if so, i have all my
images in a page with full URL, will that slow down the page download time?

Best of all, is it possible to deliver both text/html and image/gif in one
http request? I suspect that typically they are separate requsts to the
server, right?

Any pointer or insight would be appreciated.

Shawn

 >> Stay informed about: difference between relative path and full URL 
Back to top
Login to vote
karim34112

External


Since: Oct 22, 2003
Posts: 353



(Msg. 2) Posted: Tue Jan 11, 2005 11:52 am
Post subject: Re: difference between relative path and full URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 11 Jan 2005 11:46:15 -0500, shawn wrote:

 > Hi,
 >
 > My question is does anyone know the difference between specifying a relative
 > path such as
 > <img src="images/myimg.gif"> and full URL
 > <img src="http://mysite.com/images/myimg.gif">?
 >
 > Does the second one issue an additional http request? if so, i have all my
 > images in a page with full URL, will that slow down the page download time?
 >
 > Best of all, is it possible to deliver both text/html and image/gif in one
 > http request? I suspect that typically they are separate requsts to the
 > server, right?
 >
 > Any pointer or insight would be appreciated.
 >
 > Shawn

They both work but you should use relative paths. If you change the domain
name or copy the files to another site, you have renaming to do.

Karim
--
<a style='text-decoration: underline;' href="http://www.cheapesthosting.com" target="_blank">http://www.cheapesthosting.com</a> - Innovative Web Hosting since 1998
Spam and Virus protected email - Online calendars with email notification
Camera phone photos automatic transfers to your photo album (RSS Enabled)<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: difference between relative path and full URL 
Back to top
Login to vote
spam19

External


Since: May 08, 2004
Posts: 952



(Msg. 3) Posted: Tue Jan 11, 2005 12:07 pm
Post subject: Re: difference between relative path and full URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 11 Jan 2005 11:46:15 -0500, shawn <shawn.TakeThisOut@noemail.nowhere.com>
wrote:

 > Hi,
 >
 > My question is does anyone know the difference between specifying a
 > relative path such as
 > <img src="images/myimg.gif"> and full URL
 > <img src="http://mysite.com/images/myimg.gif">?
 >
 > Does the second one issue an additional http request? if so, i have all
 > my
 > images in a page with full URL, will that slow down the page download
 > time?

Both will be treated the same by the client; all requests will be made
separately. Some servers support pipelining, which means all the requests
will be sent via the same socket connection, but still, each and every
request is sent (unless the client decides or is told not to).

 > Best of all, is it possible to deliver both text/html and image/gif in
 > one http request?

Technically yesh, but why complicate things? Why would you want to do
this?

 > I suspect that typically they are separate requsts to the
 > server, right?

Almost without exception.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com" target="_blank">http://www.greywyvern.com</a> - Orca Knowledgebase: Completely CSS styleable
Knowledgebase/FAQ system<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: difference between relative path and full URL 
Back to top
Login to vote
user3425

External


Since: Jan 11, 2005
Posts: 1



(Msg. 4) Posted: Tue Jan 11, 2005 12:35 pm
Post subject: Re: difference between relative path and full URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"shawn" <shawn.TakeThisOut@noemail.nowhere.com> wrote:

 >My question is does anyone know the difference between specifying a relative
 >path such as
 ><img src="images/myimg.gif"> and full URL
 ><img src="http://mysite.com/images/myimg.gif">?
 >
 >Does the second one issue an additional http request?

The same for both.

 >if so, i have all my
 >images in a page with full URL, will that slow down the page download time?

Full urls require a few more bytes in the code, other than that, no.

 >Best of all, is it possible to deliver both text/html and image/gif in one
 >http request? I suspect that typically they are separate requsts to the
 >server, right?

Most servers support http 1.1 pipe lining nowadays.

--
Spartanicus<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: difference between relative path and full URL 
Back to top
Login to vote
justin3

External


Since: Dec 28, 2004
Posts: 25



(Msg. 5) Posted: Tue Jan 11, 2005 4:35 pm
Post subject: Re: difference between relative path and full URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Karim wrote:

 > They both work but you should use relative paths. If you change the domain
 > name or copy the files to another site, you have renaming to do.

That depends on your setup really... All I'd have to do is change the
domain name in a config file, and all absolute paths would be updated
automatically. Wink

--
Justin Koivisto - justin.TakeThisOut@koivi.com
<a style='text-decoration: underline;' href="http://www.koivi.com" target="_blank">http://www.koivi.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: difference between relative path and full URL 
Back to top
Login to vote
karim34112

External


Since: Oct 22, 2003
Posts: 353



(Msg. 6) Posted: Tue Jan 11, 2005 4:35 pm
Post subject: Re: difference between relative path and full URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 11 Jan 2005 20:54:34 GMT, Justin Koivisto wrote:

 > Karim wrote:
 >
  >> They both work but you should use relative paths. If you change the domain
  >> name or copy the files to another site, you have renaming to do.
 >
 > That depends on your setup really... All I'd have to do is change the
 > domain name in a config file, and all absolute paths would be updated
 > automatically. Wink


Not a clean solution. I am looking at the html source and I see all these
references to a domain name which is not the site I am looking at. Might
not work if you move to non Apache server.


Karim
--
<a style='text-decoration: underline;' href="http://www.cheapesthosting.com" target="_blank">http://www.cheapesthosting.com</a> - Innovative Web Hosting since 1998
Spam and Virus protected email - Online calendars with email notification
Camera phone photos automatic transfers to your photo album (RSS Enabled)<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: difference between relative path and full URL 
Back to top
Login to vote
nospam62

External


Since: Apr 24, 2004
Posts: 86



(Msg. 7) Posted: Tue Jan 11, 2005 5:35 pm
Post subject: Re: difference between relative path and full URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

shawn <shawn.TakeThisOut@noemail.nowhere.com> wrote:
 > Hi,
 >
 > My question is does anyone know the difference between specifying a relative
 > path such as
 > <img src="images/myimg.gif"> and full URL
 > <img src="http://mysite.com/images/myimg.gif">?
 >
 > Does the second one issue an additional http request? if so, i have all my
 > images in a page with full URL, will that slow down the page download time?

It's generally better to use relative paths whenever possible because
you can move the pages easier, maintenance is easier, and it's just
cleaner.

Images and static content may be some-what different depending on scale,
If you've got: /app/somefile.cgi and /img/somefile.gif and are working
on a HUGE scale, doing an <a style='text-decoration: underline;' href="http://img.example.com/img/somefile.gif" target="_blank">http://img.example.com/img/somefile.gif</a> and
<a style='text-decoration: underline;' href="http://app.example.com/app/somefile.cgi" target="_blank">http://app.example.com/app/somefile.cgi</a> MAY be better because
it allows you to setup a web server optimized for static content
and another server optimized for applications. (Could do the same
with your app server configuration too though)

Web servers that are strictly configured to serve static content, with no
support for CGI, authentication, paths, re-writing or any other goodies can be
a lot faster and easier on system resources. In those extreme cases, I wouldn't
even recommend apache for static content.

In most cases, it's not worth the trouble. (Totally pointless if you can't run
multiple web servers on your ISP - And unless you've got root access, or an ISP
willing to do this, you can't)

Generally, it's better to use relative paths, it'll make your
life a lot easier if you do. (Especially if you work on the
pages offline or elsewhere)

 > Best of all, is it possible to deliver both text/html and image/gif in one
 > http request? I suspect that typically they are separate requsts to the
 > server, right?

Depends on how the browser and web server are setup, they can be sent in
the same request, but I normally tell my browser not to do that because
it's kind of buggy.

Jamie
--
<a style='text-decoration: underline;' href="http://www.geniegate.com" target="_blank">http://www.geniegate.com</a> Custom web programming
guhzo_42.TakeThisOut@lnubb.pbz (rot13) User Management Solutions<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: difference between relative path and full URL 
Back to top
Login to vote
auerbach_no_sp

External


Since: Dec 26, 2004
Posts: 29



(Msg. 8) Posted: Wed Jan 12, 2005 11:35 am
Post subject: Re: difference between relative path and full URL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Justin Koivisto" <justin.DeleteThis@koivi.com> wrote in message
news:e2XEd.42$o3.1748@news7.onvoy.net...
 > Karim wrote:
 >
  >> They both work but you should use relative paths. If you change the
  >> domain
  >> name or copy the files to another site, you have renaming to do.
 >
 > That depends on your setup really... All I'd have to do is change the
 > domain name in a config file, and all absolute paths would be updated
 > automatically. Wink
 >
 > --
 > Justin Koivisto - justin.DeleteThis@koivi.com
<font color=purple> > <a style='text-decoration: underline;' href="http://www.koivi.com</font" target="_blank">http://www.koivi.com</font</a>>

Would you mind sharing with us how that work? (What the config file looks
like, where it is placed in the web, how it is called from each page, etc.)

Alex<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: difference between relative path and full URL 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Full URL path for UK version of MultiMap - Hi All I'm sending a URL search path to the UK version of MultiMap, but although it actually works it looks like I'm missing a param because the page that appears also has a JS error. FYR, my current HREF is ..

Relative Positioning? - I've just had a go at using relative positioning but am finding major differences between IE6 and Netscape 7. I would normally assume Netscape to be the correct version but IE seems to be doing things as I expect and Netscape is all over the place. Anyon...

Subdomain Problem with Relative Paths - If this is the wrong NG for this, please advise... My web site uses relative paths for images and links, and everything works fine until I set up a subdomain. Loading sub.domain.com cause the main page and all linked pages in the same directory to have...

htaccess and root relative links - I think IŽll start over .. I used wrong terms in the other post Basically what I want to do is use a htaccess file to redefine a root-relative path. Here is the example: "/image/image.gif" But the document is TEMPORARILY in secondary directo...

would you accept this full time web design? - Would you accept this job as a flash designer/ web designer full time? The title will be webmaster. You are working as a temp. You are getting paid $32.00 an hour. That's a little over $66,000 a year! Wow! But there is no benifits or retirement plan. ....
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]