http://www.example.com?foo
What's the term for the foo
part of the URL?
Its name is query string. After the question mark you can pass key-value pairs and use them server-side.
Yes, it is valid.
A query string is the portion of a URL where data is passed to a web application and/or back-end database. The reason we need query strings is that the HTTP protocol is stateless by design. For a website to be anything more than a brochure, you need to maintain state (store data).
It's the query, or sometimes the query string.
To pinch a useful diagram from the URI RFC:
foo://example.com:8042/over/there?name=ferret#nose \_/ \______________/\_________/ \_________/ \__/ | | | | | scheme authority path query fragment
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With