Skip to content
techskilldaily.
The archiveNo. 001
Understand the web

What comes after the question mark?

Read the small instructions tucked inside a web address—and understand what a shared link might remember.

3 min read 3 min to try
MAKE ROOM FORoneSMALL SKILL

There’s more to a link than a destination.

You search a website, choose a category, and sort the results. Sometimes those choices appear in the address bar. The page is the destination; the extra text records a few instructions for what to show there.

In the fictional address below, /search is the path. The question mark starts the query string. After it, topic=python is a name-value pair: the name is topic and the value is python. The ampersand separates that pair from sort=newest.

These names are chosen by the website. There is no universal rule that every site understands topic or sort. A server can use the values, browser code can use them, or a site can ignore them.

A web address split into four labeled parts: /search is the path, ?topic=python begins the query, &sort=newest adds a parameter, and #results is a fragment.
Illustrated browser address: punctuation gives each part of the link a different job. View full size ↗

Read the link before you share it.

If a site stores filters in its URL, sharing that address can preserve your view for another reader. That’s why one link opens all products while another opens only the blue ones. Other sites keep these choices in the browser instead, so the link alone won’t reproduce them.

A fragment starts with a hash symbol, as in #results. It often points to a part of the page and is separate from the query string. You may also see encoded characters such as %20 for a space; links use encoding to represent characters safely.

Reading an address is useful even if you never write code. It gives you a clue about what a link will do. Don’t remove unfamiliar parameters from sign-in or payment links: some values are necessary for the link to work.

A fictional address · reading example only
https://example.com/search?topic=python&sort=newest#results
Your turn 3 minutes

Decode a link in plain English.

  1. Read the fictional address above without opening it.
  2. Find the path, then identify the two query parameter names and their values.
  3. Explain what changing sort=newest to sort=oldest might request, if the site supported that value.

Which part names the page, and which parts describe the view?

A little nudge

Use the punctuation as landmarks: ? starts the query, & separates pairs, and # starts the fragment.

What to look for

Path: /search. Query parameters: topic is python and sort is newest. Fragment: results. The changed sort value might request oldest-first results, but the website decides whether that value is supported.

Take it one small step further

Look at the address bar after using search on a familiar website. Does it record your search? Observe it without changing or sharing private values.

Keep this bit

The path identifies a resource; the query string can carry options for it.

Read more: MDN · URL query parameters ↗

No submission needed. This one is just for you.

Another spark of curiosityLess wall of text. More useful answer.