Socket
Socket
Sign inDemoInstall

clearsitedata

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    clearsitedata

Middleware to set the Clear-Site-Data HTTP header


Version published
Weekly downloads
36
decreased by-33.33%
Maintainers
1
Install size
5.19 kB
Created
Weekly downloads
 

Changelog

Source

0.2.0 - 2019-07-29

Added

  • Created a changelog
  • Added TypeScript type definitions. See #2

Changed

  • Updated behavior to match spec
  • Updated documentation

No changes were recorded before version 0.1.0.

Readme

Source

Clear Site Data

Build Status

The Clear-Site-Data HTTP header allows you to instruct browsers to clear all of their local data (caches, cookies, etc). This is useful in a number of cases, like when a user logs out.

Usage:

const clearSiteData = require('clearsitedata')

// Clear everything
app.post('/logout', clearSiteData({
  directives: ['*']
}))

// Clearing everything is the default
app.post('/logout', clearSiteData())

// Only clear cookies and storage
app.post('/logout', clearSiteData({
  directives: ['cookies', 'storage']
}))

Keywords

FAQs

Last updated on 29 Jul 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc