Socket
Socket
Sign inDemoInstall

netjet

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netjet

Express middleware to generate preload headers


Version published
Weekly downloads
322
decreased by-4.73%
Maintainers
1
Weekly downloads
 
Created
Source

netjet Travis-CI Status

netjet is a Node.js HTTP middleware to automatically insert Preload link headers in HTML responses. These Preload link headers allow for web browsers to initiate early resource fetching before being needed for execution.

Example usage

var express = require('express');
var netjet = require('netjet');
var root = '/path/to/static/folder';

express()
  .use(netjet())
  .use(express.static(root))
  .listen(1337);

Options

  • images, scripts, and styles: Boolean:

    If true the corresponding subresources are parsed and added as a Preload Link headers.

  • cache: Object:

    Object passed straight to lru-cache. It is highly recommended to set cache.max to an integer.

  • attributes: Array<String>

    List of custom attributes that should be added to the Preload Link headers.

License

MIT License see LICENSE.md.

Keywords

FAQs

Package last updated on 12 Jun 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc