1

We recently upgraded from 2.3.1 to 2.3.4-p2. However we're getting reports from end-users of some core functionality, such as the checkout process, breaking due to their browser serving outdated files (I assume files from before the upgrade).

Asking them to manually clear their cookies / cache fixes the issue on their end, however that doesn't sound like the proper solution.

We've already ran the following:

rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf generated/code/*
bin/magento s:up
bin/magento s:d:c
bin/magento s:s:d -f
bin/magento i:rei
bin/magento c:f

Is there any other proper ways to make sure end-users are being served up-to-date static resources?

1 Answer 1

1

Use static content signing

https://devdocs.magento.com/guides/v2.3/config-guide/cache/static-content-signing.html

The version parameter ensures latest version

If this is enabled it's a different issue. Perhaps a proxy cache has cached out of date page content. In which case you need to clear proxy cache after any deployment.

5
  • Thanks for suggestion, what about if server is in production mode? I don't see the Developer option / menu when in production
    – AJK
    Jul 6, 2020 at 18:15
  • Use shell command bin/magento config:set dev/static/sign <value> Jul 6, 2020 at 22:18
  • But yes - it's hidden magento.stackexchange.com/questions/195239/… - possibly the single stupidest design decision I've ever come across in M2 Jul 6, 2020 at 22:23
  • Thanks, I'll test that out using the shell command!
    – AJK
    Jul 7, 2020 at 12:51
  • Thanks, using the shell command enabled that option and that seems to be working!
    – AJK
    Jul 7, 2020 at 13:38

Your Answer

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

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