2

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.

isherwood
  • 58,414
  • 16
  • 114
  • 157
Jassar Mahmoud
  • 300
  • 4
  • 13
  • 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 Answers1

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