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測試