Parlez-vous Internet?
Posted on 2 Jul 2002 at 17:35
If you can't speak the Net lingo, don't worry, as Davey Winder has all the answers - in good old plain English.
There are two different types of URI/URL at present: absolute and relative (some might say three if you include fragment identifiers, but as they've never been an official part of the http scheme I won't cover them here). An absolute URL, as the name suggests, provides the complete Internet address needed to locate a specific resource. It does this by first specifying the transfer protocol scheme, then the host server name and finally the directory and file itself, as explained above.
Relative URLs can access files without supplying the whole address. You'll most probably have used far more relative URLs in your Web browsing travels than you have absolute ones, even though you might not realise it. For the vast majority of Web sites, most links point to resources (documents and files) located on the same server, often in the same directory: these are called relative because their address is relative to the URL of the base HTML document in which they're embedded. When you access a relative URL this base section is automatically linked to the client, saving the need for any separate specification. In other words, whenever you move from one page to another on the same site, the browser can ignore everything that appears after the last backslash in the URL and replace it with the relative URL specified, thus creating in essence a new absolute reference. Relative URLs, obviously, can only be used when the linked resource is located at the same base URL as the original calling document, but they're essential if you want to make a site portable, as well as for the most economical HTML expression.
Finally, I guess I should say a word or two about abbreviating URLs, especially seeing as I'm as guilty of this practice as anyone. As you'll by now, I hope, appreciate, the syntax for URIs and URLs has been developed so as to remove ambiguous references to network resources, at the expense of being less than easy on the eye. Not that long ago URLs were a constant source of jokes for the mainstream the media, because of all the colons and backslashes they required. Nowadays, however, when the newsreader has finished his story, he'll probably say simply 'more about this on our Web site at www.bbc.co.uk' or whatever, in the process totally removing the URL's scheme. This same shorthand has now become accepted in print, and whenever I refer to a Web page I won't bother with the additional typing of http://, because it's annoying, time-consuming and can look scruffy on the page. The only time I would include the URL scheme would be if it's some resource other than a Web page I'm referring to, like an ftp site or a Telnet resource.
The danger comes, though, when people start using such abbreviated URIs on the Net and discover that their fancy clients (the latest versions of Netscape Navigator and Internet Explorer, for example) can understand them too. Over time this may lead them to believe, wrongly, that this shorthand URL is the accepted norm, and that's when things could fall apart. When some new URI schemes are introduced, the client won't be able to translate them correctly, nor will the server be able to deliver the resources requested. Think about it: if a shorthand URL has exactly the same syntax as a relative URL path it just won't work, effectively limiting its use to sites without defined base URLs. So perhaps the time has come to take what appears to be a backward step into the future and start using those full URIs from now on.
Wavey's Web site of the month
advertisement
- How to change the default template in Word 2007
- Book review: Rework by Jason Fried and David Heinemeier Hansson
- Panorama parents deserve their file-sharing fine
- Google and BT offer free website service to British businesses
- Lords' last chance to protect broadband customers
- Extreme handwriting recognition on the Dell Latitude XT2
- 12 surprising things that Wolfram Alpha knows
- Nokia N900: phone or pocket computer?
- The sinister side of Spotify
- My brain can type!
- ISPs forced to advertise average speeds in US
- US pumps billions into broadband plan
- Lords snub last chance to help broadband customers
- Core Tory voters "the last to get super-fast broadband"
- BT brings ADSL2+ to 150 more towns
- Website-blocking law was "copied" from BPI
- Small businesses "need a minimum of 8 meg broadband"
- Tories: next Google should be British
- Virgin to deliver rural broadband via telegraph poles
- Child net protection plans dropped in the Lords
advertisement


Printed from www.pcpro.co.uk