Query string is string included in the url after a question mark (?)
A Query String is the string passed to the url in the form of parameters, it can contain one or more parameters, each parameter is separated using the ampersand (&)
Below is a real world use-case of query string and parameters.
Explanation – Lets look at the Query string breakdown
In the above example, we search for a keyword “mrvirk” in Google search, and the page passes 3 parameters back to the Google server that helps G Search to provide you results for the keyword
- Parameter 1 (client=firefox-b-d): tells google what browser user is on, in my case its Firefox
- Parameter 2 (channel=trow): tells google the channel
- Parameter 3 (q=mrvirk): tells google what the user searched for, in this case mrvirk
Video Tutorial
You can play around and learn more about making use of Query String and Parameters in real world project in the article below –