0

At present when we modify the JS or CSS file, the only way to update the Customers browser is to change the sign for static files globally by running static-content:deploy or at most we can give --no-css or --no-javascript option for css or js respectively. Now my question is can we change the version number for the file only which was modified, like suppose i changed Test_Example::web/css/test.css file, then only test.css file changes should be pushed to the customers browser. Please give me solution for this requirement if anyone has already done this similar kind of solution. The reason for this requirement is that using the static-content:deploy totally flushes the customer cache files as the version number changes, and it takes time for the data to load into cache of the customer when he loads the site for first time after static-content:deploy command ran.

asked Jul 9, 2018 at 14:44

1 Answer 1

1

You can disable the signing of static files. Go to: Stores > Configuration > Advanced > Developer > Static files setting and set Sign static files to no. After that, it doesn't generate a static content version number. That should do the trick.

answered Jul 9, 2018 at 14:55
1
  • I am aware of this option, but i think this option will stop loading the changed files from the server and use the old cached files only. Every time it will load everything from browser cache instead of loading from the from the server even if the changes are made to particular css or js file at the server end. Commented Jul 9, 2018 at 15:32

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.