1.3.3. URL
You all know very well the World Wide Web. Already by reading this lesson
you are using a Web Browser and the Internet.
When
starting your Web Browser you do it always with the intention to get some
information of the WWW such as e.g. looking up the timetable of your train,
looking up the price of the newest computer, etc. Your first act is always
entering the URL of your wanted Web Page in the address bar of your
browser.
It may look like this:
http://www.ika.ethz.ch:80/teaching/mmkarto
Have you ever asked what role play all these components? We provide you some answers:
![]() | |
URL |
- Type of Protocol: is used for the communication,
- Domain Name (Host): is used to know with whom is communicated,
- Network Port on the Server: is the access point on the server for data entry or exit,
- Path: gives the path to the resource on the server.
![]() | The Domain Name can be replaced by the IP address of the
server: the URL would then look like this: |
Query Strings
In addition to the path where the wanted file is
stored, URLs can be extended by query strings. To understand what is meant by
this we want you to do a little exercise:
- Open a new browser window and type the following address in the address bar: http://www.google.ch/search?q=cartouche&q=e-learning
- Press the "Enter key" and look what happens.
We entered the query for these terms already in the URL by using the query string "?q=cartouche&q=e-learning". The query starts with a question mark "?" and is followed of one or a series of parameter=value pairs (in our case this is "q=cartouche" and "q=e-learning"). The series of pairs is seperated by the ampersand "&". The presented query can therefore be extended by an arbitrary number of pairs.
![]() | Try to create other queries by changing the values of the parameter q and adding other parameter=value pairs. Look at the result you get in your browser. |
Additional exercise
(Mouseclick to see solution)
Enter some searching terms in the search bar of an arbitrary search machine. After having pressed the "Start-Search-Button" have a look at the URL that will be created automatically. You don't have to understand the meaning of every single parameter but normally the meanings can be guessed.