Skip to content

Add consistent ?mv={version} cache busting suffix to prevent browser cache issues #16016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2022

Conversation

Mark-H
Copy link
Collaborator

@Mark-H Mark-H commented Jan 31, 2022

What does it do?

Adds ?mv={version} to registered css and js scripts that are prone to change between releases.

Note I've opted for ?mv instead of ?v because there are extras that already use their own ?v so this reduces the odds of conflicts.

Why is it needed?

Avoid sticky browser caches like https://community.modx.com/t/modx-3-0-0-package-management-processor-not-found/4908

How to test

Confirm correct version string gets added and things still work.

Related issue(s)/PR(s)

N/a

@Mark-H Mark-H added this to the v3.0.0-rc2 milestone Jan 31, 2022
@Mark-H Mark-H requested a review from opengeek as a code owner January 31, 2022 23:44
@cla-bot cla-bot bot added the cla-signed CLA confirmed for contributors to this PR. label Jan 31, 2022
@modxcms modxcms deleted a comment from rthrash Jan 31, 2022
@Ibochkarev Ibochkarev added the pr/ready-for-merging Pull request reviewed and tested and ready for merging. label Feb 1, 2022
@opengeek opengeek merged commit 85de6b6 into modxcms:3.x Feb 1, 2022
@Mark-H Mark-H deleted the 3.x-cachebust branch February 2, 2022 12:04
@Mark-H
Copy link
Collaborator Author

Mark-H commented Feb 2, 2022

Oof, I only just noticed this is missing the key part of the PR. Why did nobody question if that one tweak was all there was to it 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed CLA confirmed for contributors to this PR. pr/ready-for-merging Pull request reviewed and tested and ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants