I have a VueJS application. When creating a build using a npm run server, and load it on server I need to clear the cache every time. I need a way to avoid CSS and JS file cache on the server.
Asked
Active
Viewed 3,800 times
1
isherwood
- 52,576
- 15
- 105
- 143
Jassar Mahmoud
- 181
- 3
- 11
-
Lots of discussion on this already. Did you search? https://stackoverflow.com/questions/45867357/vuejs-browser-caching-production-builds Also, you need to show some code and what attempt you've made. – isherwood May 20 '20 at 16:28
-
Please show your existing webpack configuration. – Ohgodwhy May 20 '20 at 16:56
1 Answers
0
First you can use session like that : import VueSession from 'vue-session' Vue.use(VueSession) Second you can get session like that : this.$session.clear()
So, In other to clear session, you can use above code. In my project i user above code at dashboard.vue on "created()" instance. enter image description here
Paul
- 1
- 1