THE GITHTML FIELD GUIDE
Why query-string tabs stop working in saved HTML
A query string does not automatically select content inside a static HTML file. If tabs or filters depend on a server or script reading the query, a saved copy may show only a default state. Export the needed states as actual content and use ordinary section links when the task is offline reading.
Identify the specific failure
A URL ending in ?tab=errors can be meaningful to an application while having no built-in effect on the document. Removing the application logic leaves the parameter intact but its behavior absent. A reader cannot infer which hidden data was intended.
Make a narrow correction
Choose the views needed for the report and label them explicitly. Use fragment links to sections that are already present, not query parameters that assume a route handler. Include the filter criteria in text so a snapshot does not masquerade as an unfiltered dataset.
- Determine whether a query is processed by a server, script, or neither.
- Render required filter states into clearly labeled sections.
- Replace nonfunctional tab URLs with links to content that exists in the file.
<a href="#errors">Errors in this snapshot</a>
<section id="errors"><h2>Errors</h2><p>Filter: severity equals error.</p></section>Turn an application view into a labeled static selection
Consider an online report with three tabs and a URL ending in ?view=failures. The server may render the selected tab, or client code may read the parameter and reveal it after loading. Determine which mechanism produces the content before exporting. If the saved HTML contains only a shared application shell, retaining the query string preserves the request description but not the requested data. If it contains several panels, inspect which panel is visible and whether its filter is accurately labeled.
For a static copy, create sections such as Failed checks and Skipped checks with stable fragment targets. Put the scope beside each section: environment, observation period, and selection rule. A fragment link can navigate to a section already present; it cannot manufacture a missing filtered result. If the export contains only failures, say that clearly near the top so readers do not interpret the absence of passing rows as a full-system failure or mistake the snapshot for an unfiltered dataset.
Distinguish filtering from pagination. A query may request page three of a result set rather than a named tab. Exporting one page requires an explicit statement that other pages are omitted, and a total count should distinguish displayed rows from total matching rows. Do not replace every query string mechanically with a fragment, because each parameter may have a different role. The finished reading copy should let a reader identify exactly which information is included without knowing how the original application interpreted its URL or having to activate its former controls.
Verify the repaired artifact
Open the copy directly at each advertised link and check that the requested information is actually visible without initialization code.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.