chrome扩展清除指定站点缓存chrome.browsingData.remove

案例

// 注意仅支持在后台运行
chrome.browsingData.remove({
 	since: Date.now() - 1000 * 60 * 60 * 24 * 7, // 整个浏览最近7天的
 	origins: ["http://www.xxx.com"], // 如果设置了origins则仅对这里的地址,否则则所有站点
}, {
  "appcache": true,
  "cache": true,
  "cacheStorage": true,
  "cookies": true,
  // "downloads": true,
  // "fileSystems": true,
  // "formData": true,
  // "history": true,
  "indexedDB": true,
  "localStorage": true,
  // "passwords": true,
  "serviceWorkers": true,
  "webSQL": true
}, () => {
	console.log('清除完成')
})

参考资料

相关推荐

  1. chrome扩展清除指定站点缓存chrome.browsingData.remove

    2024-07-17 06:10:07       28 阅读
  2. 零基础 Chrome 扩展开发指南

    2024-07-17 06:10:07       35 阅读
  3. 开发chrome扩展( 禁止指定域名使用插件)

    2024-07-17 06:10:07       41 阅读
  4. Chrome扩展之通信

    2024-07-17 06:10:07       49 阅读
  5. Chrome扩展开发纪要

    2024-07-17 06:10:07       53 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-17 06:10:07       66 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-17 06:10:07       70 阅读
  3. 在Django里面运行非项目文件

    2024-07-17 06:10:07       57 阅读
  4. Python语言-面向对象

    2024-07-17 06:10:07       68 阅读

热门阅读

  1. linux中导出sql脚本

    2024-07-17 06:10:07       21 阅读
  2. git 提交远程仓库 方式

    2024-07-17 06:10:07       26 阅读
  3. 热修复的原理

    2024-07-17 06:10:07       22 阅读
  4. Springboot 3.x - Reactive programming (2)

    2024-07-17 06:10:07       25 阅读
  5. C++基础语法:STL之容器(1)--容器概述和序列概述

    2024-07-17 06:10:07       31 阅读
  6. 【前端】原生实现图片的放大与缩放

    2024-07-17 06:10:07       22 阅读
  7. Meta Llama - Model Cards & Prompt formats

    2024-07-17 06:10:07       22 阅读
  8. 后端开发面试题

    2024-07-17 06:10:07       22 阅读
  9. 自动化回滚的艺术:Conda包依赖的智能管理策略

    2024-07-17 06:10:07       26 阅读
  10. 探索Dubbo的服务引用:XML配置方式

    2024-07-17 06:10:07       25 阅读