Meta Refresh seconds;url Format

Builds an escaped meta refresh element from a nonnegative integer delay in seconds and an absolute HTTP(S) URL. The URL is normalized with the portable WHATWG URL helper; relative URLs and fractional-delay parser behavior are outside this builder profile.

Description

A refresh metadata element requests delayed navigation or refresh.

A refresh metadata element requests delayed navigation or refresh. Delay formatting, URL normalization and safe HTML attribute serialization are separate parts of constructing it.1

The tool returns content, element. The fields describe the supplied local pattern or effective state, or contain the formatted markup shown below.

When to use Meta Refresh seconds;url Format

Use this for the following task: Builds an escaped meta refresh element from a nonnegative integer delay in seconds and an absolute HTTP(S) URL. The URL is normalized with the portable WHATWG URL helper; relative URLs and fractional-delay parser behavior are outside this builder profile. Provide the requested local fields extracted from the relevant element or attribute.

How to use Meta Refresh seconds;url Format and understand its results

  1. Prepare the parsed element names, attribute values or direct element-child lists requested below. Keep attribute presence separate from its value.
  2. Enter seconds, url according to the field table, then run the tool.
  3. Read content, element. Check the effective state, recognized-token flags or generated markup against the rules below.
  4. Correct any reported local mismatch and check the resulting markup in its intended document and browser context.
Input fieldMeaningValue type and boundsRequirement
secondsSecondsinteger; minimum 0; maximum 9007199254740991Required
urlUrlstring; maximum text length 10000Required

Enter a nonnegative safe-integer delay and absolute HTTP(S) URL. Parse with the portable WHATWG URL helper, reject other schemes, normalize href and escape the resulting content for a meta element.

content=integer seconds + ;url= + normalized absolute HTTP(S) URL

The symbols and boundary conditions refer to the supplied fields and the implementation described above.

Output fieldMeaningValue type
contentContentstring
elementElementstring
json
{
  "input": {
    "seconds": 5,
    "url": "https://example.org/next?a=1&b=2"
  },
  "output": {
    "content": "5;url=https://example.org/next?a=1&b=2",
    "element": "<meta http-equiv=\"refresh\" content=\"5;url=https://example.org/next?a=1&amp;b=2\">"
  }
}

Limitations and assumptions

This builder’s profile excludes relative URLs and fractional delays even though broader refresh parsing has other cases. It does not navigate, validate the destination response or assess refresh accessibility.

The tool does not fetch a page, run a browser or validate an entire HTML document. Malformed tool requests produce input errors; valid requests can still report unrecognized values or failed local checks.

Alternative or Complementary methods

Choose Canonical link rel Check when you need its operation: Checks the canonical relation and a nonempty parsed href. Relative href values are accepted; this does not establish URL validity or canonical selection by search engines. Choose Anchor download Filename Attr for the complementary operation: Serializes a suggested filename into a double-quoted anchor download attribute. Empty filename requests downloading without a suggested name. Browser origin policy and filesystem filename sanitization are separate.

Background reference: HTML Standard: Meta Refresh seconds;url Format.

References

  1. HTML Standard: Meta Refresh seconds;url Format — WHATWG

Similar or alternative tools

  • Canonical link rel Check

    Checks the canonical relation and a nonempty parsed href. Relative href values are accepted; this does not establish URL validity or canonical selection by search engines.

  • Anchor download Filename Attr

    Serializes a suggested filename into a double-quoted anchor download attribute. Empty filename requests downloading without a suggested name. Browser origin policy and filesystem filename sanitization are separate.

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