Learn something new every day
More Info... by email
The web browser has revolutionized computers and the information made available using them. Sometimes using a web browser is as simple as entering "www.somewebsite.com" into the address bar and pressing enter (or clicking the GO button). Many times this will take any computer user where they need to go and nothing further will be needed.
Other times, a web surfer may be visiting a search engine when the search query is entered and the web surfer clicks the search button the item in the address bar is no longer very friendly. Consider the following example:
To search for Malted Milk Balls on the Internet, using Google, the string "Malted Milk Balls" is entered and the search button is clicked.
The address bar changes when the results are returned to display the following:
The portion beyond the last forward slash (/) is referred to as a querystring. A querystring is a URL containing a list of variables which are passed to the web server to retrieve information. In the case of the example above, the querystring tells the web server at Google to search the database in english (hl=en) and query the database for Malted+Milk+Balls (q=Malted+Milk+Balls). The last variable passed is the button used to find the results (btnG=Search).
If the Google Search Button on the homepage had been clicked, the btnG= portion of the query string would have read something like btnG=Google+Search.
Querystrings may not seem all too useful, but they can assist in accessing applications from other pieces of code and allow the web page to be skipped. For example, some web pages now include their own Google search boxes. These boxes work the same as the one shown on Google.com by simply sending a query string with s=
The use of query strings can also be used to create a search for a particular site or search engine in the search engine dialog of both Internet Explorer 7+ and Mozilla Firefox. These features in the browser allow any website with a search box to be used from the browser without visiting the actual search page. Query strings help make this possible.
One more way to use a querystring would be to enter http://www.google.com/search?q=fun+and+games into a browser address bar. The result should return results for fun and games. It passes the querystring "fun and games" to the search application at google.com.
A querysting is just another way to access applications on the Internet. Many times they may not be noticed, but other times they can allow additional access to web based services and databases.
One of our editors will review your suggestion and make changes if warranted. Note that depending on the number of suggestions we receive, this can take anywhere from a few hours to a few days. Thank you for helping to improve wiseGEEK!