Search radius reflected in URL parameters for shareability
Why it matters
When search radius, center coordinates, and filters live only in component state, users cannot bookmark a result set, share a link to nearby listings, or reload without losing context — a direct hit to organic sharing, paid-ad landing pages, and SEO for location pages. Back-button navigation also breaks because the browser has no URL delta to restore. Encoding search state in the query string is the canonical fix and aligns with W3C URI design guidance on addressable resources.
Severity rationale
High because unshareable search URLs kill viral distribution, paid-link targeting, and back-button restoration on every radius query.
Remediation
Push the active latitude, longitude, radius, and any filters into the URL query string on every search mutation, and hydrate the search form and results from router.query on mount so a pasted URL reproduces the same result set. Implement this inside the search page (e.g. src/app/listings/page.tsx) using shallow navigation to avoid a full reload:
router.push(
{ pathname: '/listings', query: { lat, lng, radius, ...filters } },
undefined,
{ shallow: true },
);
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Map & Location Integration Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from directory-map-location·automated