【问题标题】:How to clear site data of devtool programmatically javascript/jquery如何以编程方式清除 devtool 的站点数据 javascript/jquery
【发布时间】:2022-12-04 12:27:27
【问题描述】:

I am trying to have a jquery/javascript code to clear site data of chrome devtool. I found so many similar questions asked by other developers but didn\'t found any working solution so far. Here is the similar question asked, but the solution is unknown.

I am stuck in a situation where I want the site data should be cleared automatically by any way. I need to clear cookies, cache, Indexed DB, localstorage, session storage. I know localStorage.clear() and sessionStorage.clear() and these functions return undefined.

I checked this solution but it seems this not a solution.

Can anyone have any workaround to achieve this? It would be a great help for me.

Thanks!

  • You can\'t clear cache in JS, also you can\'t clear cookies marked with HTTPOnly. The mentioned storage clearing methods will clear the storages, the return value of the methods is undefined, they\'re not supposed to return anything.

标签: javascript jquery clear-site-data


【解决方案1】:
猜你喜欢
  • 2020-11-27
  • 2015-09-24
  • 1970-01-01
  • 2011-06-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多