Skip to content
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

[DIRTY]Hotfix/cache buster #38

Closed
wants to merge 4 commits into from
Closed

[DIRTY]Hotfix/cache buster #38

wants to merge 4 commits into from

Conversation

khleomix
Copy link
Contributor

Closes

#37

Link to test

Test locally

Description

  • Remove manual version update script
  • Add Automatic Cache Busting for CSS and JS: automatically appends the file modification time as a version parameter to the URLs of enqueued styles and scripts, ensuring that browsers fetch the most recent version whenever the files are updated.

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

Screenshot 2024-09-27 at 5 49 27 AM

Added to documentation?

  • 📜 README.md
  • 📓 Confluence
  • 🙅 No documentation needed

Added tests?

  • 👍 Yes
  • 🙅 No, because they aren't needed
  • 🙋 No, because I need help

Testing Instructions

  1. Make a simple change to the style.css file. For example, add a comment or change a CSS rule.
  2. Run npm run build
  3. Inspect the source code of the page.
  4. Search for the and <script> tags for the enqueued CSS and JS files. You should see that the URL for style.css and the JavaScript files now includes a ver parameter with the modification timestamp appended. Example:
<link rel='stylesheet' id='wdsbt-styles-css'  href='https://example.com/wp-content/themes/wds-bt/style.css?ver=1695621453' type='text/css' media='all' />

Reviewer's Testing Checklist

As a reviewer, please verify that the relevant testing criteria are fulfilled and confirmed before approving this Pull Request.

  • Visual Regression Testing: Ensure that existing functionality is not negatively impacted by the changes.
  • Cross-Browser Compatibility: Test on major browsers (Chrome, Firefox, Safari) to ensure compatibility.
  • Mobile Responsiveness: Confirm that the changes are responsive and functional on various mobile devices.
  • Theme Compatibility: Ensure that the changes do not adversely affect the site's theme and styling.
  • Linting: Check that the code passes all linting checks (PHPCS, ESLint, SassLint). Check if PR passes code quality check.
  • Accessibility Testing: Validate that the changes comply with accessibility standards. Run npm run a11y.
  • Security Best Practices: Ensure that the code follows WordPress security best practices. Check if PR passes security check.
  • Documentation: Ensure that any new features or changes are appropriately documented in the README.md or Confluence.
  • Post-Deployment Tasks: Check if there are any tasks that need to be performed after deployment.

[optional] Additional Reviewer Notes or Considerations?

@khleomix khleomix added bug Something isn't working hotfix Urgent patches for critical issues. patch labels Sep 26, 2024
@khleomix khleomix self-assigned this Sep 26, 2024
@khleomix khleomix changed the title Hotfix/cache buster [DIRTY]Hotfix/cache buster Sep 26, 2024
@khleomix khleomix closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hotfix Urgent patches for critical issues. patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant