You are here

function pwa_user_login in Progressive Web App 7.2

Implements hook_user_login().

Clear all serviceworker/localstorage on login to make sure what gets precached is up to date. By default SW is not enabled for authenticated users.

See also

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Clear-Site-Data

File

./pwa.module, line 532

Code

function pwa_user_login(&$edit, $account) {
  drupal_add_http_header('Clear-Site-Data', '"storage"');
}