+ 2
what does it mean "links can be either absolute or relative"? what is the difference?
4 Answers
+ 10
An absolute URL contains more information than a relative URL does. Relative URLs are more convenient because they are shorter and often more portable. However, you can use them only to reference links on the same server as the page that contains them.
Absolute url is like of this form protocol://domain/path ,
TheĀ protocolĀ is usuallyĀ http://, but can also beĀ https://,Ā ftp://,Ā gopher://, orfile://. TheĀ domainĀ is the name of the website , and path is directory and file associated with
and where as
Ā Ā relative URLĀ - points to a file within a web site ( like action="example.htm")
+ 1
How are relative URLs more convenient if you want to link to a file on another domain or simply link to another website? Both relative and absolute links have their own function and are used for different needs and purposes, but you can even use an absolute URL on your own site/domain.
0
Sauravš, you really know your stuff
0
Ok zinc š