What is the use and benefit of static content signing in Magento 2 ? Is it recommended to disable it from backend ?


It's best to keep Static Content Signing Enabled due to it's performance benefits.

You can read more about it on the Magento 2 DevDocs - http://devdocs.magento.com/guides/v2.2/config-guide/cache/static-content-signing.html

  • Okay. Thanks for your response. I understood. But I think in most cases such static sign didn't work. I need to disable it. Otherwise CSS, JS etc. are not loading in the frontend due to 404 error for those static files. – Kishan Patadia Feb 22 '18 at 10:57
  • If you're receiving 404s on those files with Static Content Signing enabled then your web server isn't setup correctly. Refer to the sample .htaccess or NGINX config on the Magento 2 repo. – Matt Antley Feb 22 '18 at 11:00
  • If you're able to confirm which web server you're using (NGINX/Apache) then I can help further. – Matt Antley Feb 22 '18 at 11:46
  • I m using ngnix – Sarvesh Tiwari Apr 11 '20 at 22:58

Static content signing is one of those Magento feature which solve the problem of browser cache on client side, for example if you have changed the css/image on a web page with same url, normally browser will cache it and in order for user to have the updated css/image, they need to clear their browser cache untill it expires. Magento solve this problem by invalidating the browser cache for static resources by adding a deployment version to the URL of static files.

So now each time if something is changed in the static files, Magento will change the url which will force browser to reload the updated css/image.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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