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
Download a year of Davey Winder's Online Security columns by heading to our Free Downloads site
From around the web
advertisement
- Chrome's shine getting lost in translation
- BytePac: the cardboard hard disk enclosure
- How tech loosens our grip on reality
- Hokum watch: Safer Internet Day
- Why I'm deleting Adobe from my PC
- Prepare to be patronised: it's Safer Internet Day
- Dear Sony, Samsung and every other tech company in the world: stop trying to be Apple
- Will Apple's Final Cut Pro X update placate the pros?
- Smartr Contacts for iPhone review
- Switching to Office 365's Outlook Web App
- Ofcom dithers over plans to tackle broadband slamming
- Speed-hungry customers push Virgin into profit
- Ofcom to impose price cuts on BT line rental
- Virgin hikes prices after "free" upgrade
- BT to offer 300Mbits/sec fibre "on demand"
- Ofcom outlines plans for wider 4G coverage
- Virgin upgrade to double broadband speeds
- Satellite broadband "being ignored"
- Sky blocks Newzbin over copyright claim
- Push to get more people online stalls
advertisement
