Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Full vs. realative urls...
Old 08-09-2007, 01:39 PM Full vs. realative urls...
cbeaudin's Avatar
Extreme Talker

Posts: 158
Name: cbeaudin
Location: Proud to be Canadian
Trades: 1
Is there any difference between using full or relative urls?

ie.
/images/test.gif
http://www.testdomain.com/images/test.gif

does the full url create more server load?
why use one over the other?


Thanks in advance for replies.
__________________
- cbeaudin
cbeaudin is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-09-2007, 02:40 PM Re: Full vs. realative urls...
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Both are equals, and relative don't add any overhead to the server.
Trust me, you won't have any performances related trouble by using relative paths.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 08-10-2007, 01:11 AM Re: Full vs. realative urls...
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
I guess the full URLs add a little more server load, but it's a drop in the bucket. You send down maybe 20 extra bytes in the markup adding your domain, and possibly a path stem, for every image on the page. Which might be 5 or 10 or 20 KB, so the 100 more bytes to fully qualify your domain is a drop in the bucket, but a little more load if you want to get really technical.

It's usually better to use relative paths, because then you can develop your site locally without internet access and still make sure everything works.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 08-10-2007, 02:09 AM Re: Full vs. realative urls...
Super Talker

Posts: 104
Location: http://www.joomladevs.com
Trades: 0
The full URLs put more server load
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


saurabhj is offline
Reply With Quote
View Public Profile Visit saurabhj's homepage!
 
Old 08-10-2007, 02:21 AM Re: Full vs. realative urls...
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Server load is marginal at best. There's one argument for absolute URLs that most people tend to forget: hijacking. A lot of content thieves will steal code and put it up on their own sites without even editing it. It becomes fairly easy to track duplicate content whores, since the pages are often spidered and in turn the absolute URLs are. I've caught a content jacker on more than one occasion just by doing this.

It's also recommended by people who have inside knowledge of the inner workings of big G to use absolute URLs.

http://www.vanessafoxnude.com/2007/0...-discoverable/

Quote:
Use absolute rather than relative links. For instance, when I link to previous blog posts, I link to http://www.vanessafoxnude.com/olderblogpost.php rather than olderblogpost.php.
(For those who don't know, Vanessa Fox is a former Google employee who left just recently.)
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 08-10-2007, 07:56 PM Re: Full vs. realative urls...
Experienced Talker

Posts: 38
Trades: 0
Even if one puts more load than the other, it's not going to be noticeable. Use the one that is easier for you to update in the future.

For example, if you use full URL and later you want to move the whole folder to another folder... you... are... screwed.
__________________
-Thomas Yeung

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
tomazws is offline
Reply With Quote
View Public Profile
 
Old 08-10-2007, 09:40 PM Re: Full vs. realative urls...
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Relative URLs can be easier to maintain, but like Adam mentioned full URLs are a good option when it comes to content theft.

If you have a blog your posts will inevitable get scraped and republished elsewhere. If you use relative URLs in your posts then your content is stolen. If you use absolute URLs then your content is stolen, but you at least get a link back to your site.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 08-11-2007, 03:30 AM Re: Full vs. realative urls...
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
i tend to use a go-between

i make absolute urls but instead of the domain i use a PHP var $core in my case meaning core url this enables me to just change one thing if i ever change the domain or folder on that domain etc. so i get the flexibility of local and the benifits of absolute too! yes, this would put a little bit more load on the PHP its one more thing for it to think about, but i think you would have to have a pretty crap server to notice any differance what so ever.. or just a super sensitive test both of which would have a almost unmessurable differance

hope this helps.

Dan
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 08-11-2007, 02:00 PM Re: Full vs. realative urls...
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
Quote:
Originally Posted by ADAM Web Design View Post
Server load is marginal at best.
The server load is probably about equal to the extra load on your city's power grid when you turn on a single light bulb. It's not identical, one method puts more load than the other, but it's not enough to worry about. Unless maybe your web server is a 286 with a 2400 baud modem connecting it to the outside world.

Did I just show my age?

Quote:
Originally Posted by ADAM Web Design View Post
There's one argument for absolute URLs that most people tend to forget: hijacking.
This is a good enough point that I'll probably rewrite my photo web site to use absolute URLs. Even with the extra bandwidth they create.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 08-11-2007, 02:18 PM Re: Full vs. realative urls...
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Quote:
Originally Posted by dansgalaxy View Post
i tend to use a go-between

i make absolute urls but instead of the domain i use a PHP var $core in my case meaning core url this enables me to just change one thing if i ever change the domain or folder on that domain etc. so i get the flexibility of local and the benifits of absolute too! yes, this would put a little bit more load on the PHP its one more thing for it to think about, but i think you would have to have a pretty crap server to notice any differance what so ever.. or just a super sensitive test both of which would have a almost unmessurable differance

hope this helps.

Dan
I do something similar to this, except that I call my variable Page_Root (in ASP), and I have one for Image_Root as well.

That way, if anything needs to be moved, I...am...not...screwed. I did this because I have a server on my desk and a live server located in Michigan.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 08-12-2007, 07:27 AM Re: Full vs. realative urls...
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
i started doing it with the site im making mainly because im gonna be switching the domains...

anyway i would have thought when thinking about hijacking isnt local domains better because the person has to go in and put the absolut urls to get the images and that to work...

personally when i was learning and had a habit of nickin pages.. to find out how to work etc absolute urls were much eaier to nick and ofen local would put people off i think...

Dan
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 08-14-2007, 02:45 PM Re: Full vs. realative urls...
Novice Talker

Posts: 5
Name: rafke mertens
Trades: 0
Exactly the same, except the absolute one makes your html files bigger(more characters).
rafke is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Full vs. realative urls...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35298 seconds with 12 queries