Whenever I make changes css or anything I have to ask the client to clear cache to view the changes same for me.

Any advise on how to deal with this.

Magento 2.

  • remove cache and page cache folders from var directory. Commented Nov 22, 2017 at 13:04

2 Answers 2


You could try using versioning for css and js.

This option can be enabled in the:

`Stores` ->
    `Configuration` ->
        `Advanced` ->
           `Developer` ->
              `Static Files Settings` ->
                  `Sign Static Files` ->

This option adds a timestamp to js and css files and it allows to invalidate cache in the client's browser.

After enabling this option and flushing cache from admin panel or CLI, your files will look like:


instead of


So the difference in the version1511443406 part.


This is not a real solution but can be something helpful for you. The change which you are doing in your CSS, you will need to do the same change in pub/...css file. Because this is the file which actually gets rendered.

Not Sure if this will actually solve your problem, but will possibly be a way out to your issue.

  • but isnt the issue the client browser's cache? coz we are in production mode the static files should update I guess or I might be wrong. Commented Nov 22, 2017 at 13:25
  • The way to check that is to track if the client see your css changes in view source? And is the pub file getting deployed has your changes Commented Nov 22, 2017 at 13:28
  • aha ok will try to ask customers... I wonder how big companies handle that... there must be some kind of mod expiration on cache or something Commented Nov 22, 2017 at 13:32
  • You can check that in a different machine with different location Commented Nov 22, 2017 at 13:49

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.