šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

tall-plugin-meta-refresh

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tall-plugin-meta-refresh

Tall plugin for following redirects in <meta http-equiv="refresh"> tags

8.0.0
latest
Source
npm
Version published
Weekly downloads
57
-29.63%
Maintainers
1
Weekly downloads
Ā 
Created
Source

tall-plugin-meta-refresh

A plugin for tall that allows you to follow meta refresh redirects such as:

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>The Tudors</title>
    <meta
      http-equiv="refresh"
      content="3;URL='http://thetudors.example.com/'"
    />
  </head>
  <body>
    <p>
      This page has moved to
      <a href="http://thetudors.example.com/">theTudors.example.com</a>.
      Redirecting you automatically in 3 seconds.
    </p>
  </body>
</html>

Example from W3C.

Installation

With npm:

npm i --save tall-plugin-meta-refresh

or with yarn:

yarn add tall-plugin-meta-refresh

Usage

To enable the plugin on a given tall instance:

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.

Keywords

URL

FAQs

Package last updated on 26 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts