dns-prefetch-control
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

DNS prefetch control header for Express

Build Status

This middleware lets you set the X-DNS-Prefetch-Control to control browsers' DNS prefetching. Read more about it on MDN and on Chromium's docs.

Usage:

const dnsPrefetchControl = require('dns-prefetch-control')
 
// Set X-DNS-Prefetch-Control: off
app.use(dnsPrefetchControl())
 
// Set X-DNS-Prefetch-Control: off
app.use(dnsPrefetchControl({ allow: false }))
 
// Set X-DNS-Prefetch-Control: on
app.use(dnsPrefetchControl({ allow: true }))

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.0
    19,737
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.3.0
    19,737
  • 0.2.0
    99,144
  • 0.1.0
    34,319

Package Sidebar

Install

npm i dns-prefetch-control

Weekly Downloads

124,435

Version

0.3.0

License

MIT

Unpacked Size

4.69 kB

Total Files

6

Last publish

Collaborators

  • evanhahn