Cache Bust Query Adder

Set one named cache-busting query parameter on an absolute URL while preserving other parameters and its fragment.

Description

Changing a URL's version query parameter can produce a new cache key.

Changing a URL's version query parameter can produce a new cache key. URLSearchParams serialization may also normalize query encoding while preserving parameter values.1

Set one named cache-busting query parameter on an absolute URL while preserving other parameters and its fragment.

When to use Cache Bust Query Adder

Use this tool to set one named cache-busting query parameter on an absolute URL while preserving other parameters and its fragment.

Choose the URL, decoded source text, header value or explicit byte list requested by this tool. Paste the complete relevant input and follow its parsing and encoding conventions.

How to use Cache Bust Query Adder and understand its results

  1. Choose the URL, decoded source text, header value or explicit byte list requested by this tool. Paste the complete relevant input and follow its parsing and encoding conventions.
  2. Enter url, name, value using the field table and calculation rules, then run the tool.
  3. Read url. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
urlAbsolute URL.string; maximum length: 1000000Required
nameNonempty query parameter name.string; maximum length: 1000000Required
valueExplicit cache version or token.string; maximum length: 1000000Required

Paste an absolute URL, a nonempty parameter name and an explicit version/token string. Parse the URL and set that name: replace its first existing entry and remove further same-name entries, or append if absent. Return the serialized URL with other parameter values and fragment retained. Query serialization can change spaces to plus signs and other encoding details.

parsed.searchParams.set(name,value); result=parsed.href

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
urlURL containing the cache-busting parameter.string; maximum length: 1000000
json
{
  "input": {
    "url": "https://example.com/app.js?lang=en#top",
    "name": "v",
    "value": "2026-09"
  },
  "output": {
    "url": "https://example.com/app.js?lang=en&v=2026-09#top"
  }
}

Limitations and assumptions

The tool does not generate a timestamp, invalidate a cache or guarantee a server/CDN varies on that parameter. Signed URLs may require regeneration after any query change.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use URL Search: Extract the search of an absolute URL using the WHATWG URL parser, including its normalization rules. For a complementary task, use URL Query Count: Count parsed query parameters in an absolute URL, including repeated names and empty values.

References

  1. Cache Bust Query Adder — tool.io

Similar or alternative tools

  • URL Search

    Extract the search of an absolute URL using the WHATWG URL parser, including its normalization rules.

  • URL Query Count

    Count parsed query parameters in an absolute URL, including repeated names and empty values.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies