前端 vue 等刷新清浏览器缓存的方法

vue开发过程当中发现内存一直往上飙,360时不时的提示下清理内存,测试发现每刷新一次页面内存就增长1%。vue

清掉浏览器的缓存等各类数据之后内存明显变小,刷新页面致使内存爆表。浏览器

这种问题着实不该该存在,记得在head中有能够清缓存的方式,加上以后果真不会刷新一次加1%的内存了,甚至能够必定程度上缓解vue的内存占用率大的问题,代码以下: 缓存

<meta http-equiv="pragma" content="no-cache"  />
<meta http-equiv="content-type" content="no-cache, must-revalidate" />
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
<meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT"/>

 

参考:https://blog.csdn.net/xuexiaodong009/article/details/39340637测试

参考:https://blog.csdn.net/wlzx120/article/details/52313319ui

相关文章
相关标签/搜索