+ 2
what does it mean "links can be either absolute or relative"? what is the difference?
4 Réponses
+ 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 👍