0.2.0 • Published 6 years ago

clearsitedata v0.2.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

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']
}))