Tall plugin for following redirects in <meta http-equiv="refresh"> tags
npm install tall-plugin-meta-refreshA plugin for tall that allows you to follow meta refresh redirects such as:
``html`
http-equiv="refresh"
content="3;URL='http://thetudors.example.com/'"
/>
This page has moved to
theTudors.example.com.
Redirecting you automatically in 3 seconds.
Example from W3C.
With npm:
`bash`
npm i --save tall-plugin-meta-refresh
or with yarn:
`bash`
yarn add tall-plugin-meta-refresh
To enable the plugin on a given tall instance:
`typescript
import { locationHeaderPlugin, tall } from 'tall'
import { metaRefreshPlugin } from 'tall-plugin-meta-refresh'
const url = await tall('https://example.com/a-link', {
plugins: [locationHeaderPlugin, metaRefreshPlugin]
})
console.log(url)
`
> Note: the locationHeaderPlugin is the standard behavior (following HTTP header location headers) and it should always be used before the metaRefreshPlugin.
> Warning: also be aware that the metaRefreshPlugin` will consume the entire HTTP response object, so other plugins that might be added after it won't be able to parse the response body.