I can link to a website as www.somedomain.com but usually we use http://www.somedomain.com. Is there any advantages of using http:// or what?
Yes. You don't want a browser to try and find http://www.mysite.com/www.somedomain.com/ as may happen.
If you are working in your own site and linking back to the original domain, you can do..
every ../ counts for one folder up.. Maybe not what you were asking but hope it helps :)
you can use unlimited ../'s and no matter how deep in subfolders you go it will go to the lowest level of your default index.html page.
Thanks guys, I got the point.
Aye it is pretty much the same thing as writing http://mysite.com/images/the_thing.jpg but far more portable to any domain setup (even IP addresses )
Same way the Linux file system works :) "/" at the very beginning starts at the root.
Within a web page http:// on the front indicates an absolute address, / indicates an address relative to the current domain root and anything else indicates an address relative to the current page.
Relative links are more efficient than absolute links because they don't require a lookup of a DNS to find the domain again.
I'm pretty sure the browser caches the DNS request as well. Any speed difference between relative or absolute is more then likely nothing to take into consideration.
But maybe I myself is being confused what relative and absolute links are...
relative = ../../image/eeeh.jpg;
absolute = /image/eeeh.jpg;
Ahh yeah I was getting confused there, file system paths starting with "/" are considered absolute so I was getting mixed up. :blush: