What is query string?

Experience Level: Junior
Tags: HTTP protocolQuality Assurance (QA)

Answer

The query string is a part of URL after the questionmark character.
In URL https://www.bettercoder.com/test/?q=My+query&a=112#abc the quey string is part q=My+query&a=112

  • Query string gives the developer option to pass additional parameters in the URL (for example for filtering purposes)
  • It doesn't need to be present in a URL at all. In such case the questionmark character is not needed in the URL.
  • Query string can contain multiple key-value pairs, where key is name of the parameter and value is its value. The delimiter between key-value is equal character ('='), the delimiter between parameters is ampersand character ('&').
Related Quality Assurance (QA) job interview questions

Comments

No Comments Yet.
Be the first to tell us what you think.
HTTP protocol for beginners
HTTP protocol for beginners

Are you learning Quality Assurance (QA) ? Try our test we designed to help you progress faster.

Test yourself