Home > Net >  publish jquery front-end project
publish jquery front-end project

Time:12-13

I was used adminlte admin template for my admin panel project. adminlte developed by jquery, javascript, and bootstrap. I developed a project with separate front and back-end layers, which means my front-end project is just jquery and javascript and backend is .net core. know, when I want to publish the front-end layer, I just do copy files on the server. I want to know this way is true?

one of the problems is that the browser cashes javascript files and when I copy the new version on the server, browsers load previous versions. how to solve this problem?

CodePudding user response:

I do know on firefox and chrome you can disable caching by going to the network tab on the developer panel and click the disable cache button firefox chrome

CodePudding user response:

Into your import, you can use param like ?=xxx and change this value when you have new version of this js

<script src="js/XXX.js?v=1">

next time if you want to update that

<script src="js/XXX.js?v=2">
  • Related