Skip to content

Conversation

@xecdev
Copy link
Collaborator

@xecdev xecdev commented Feb 19, 2025

Implement a cache-busting mechanism for page reloads after a successful payment and login via PayButton. Instead of a standard reload, the URL is now appended with a unique timestamp query parameter (e.g., ?t=123456789) to force browsers and caching layers to fetch a fresh version of the page. This change has been applied in both assets/js/paywalled-content.js (after payment success) and assets/js/paybutton-paywall-cashtab-login.js (after login. This update addresses a rare caching issue reported by some users, where content would not appear unlocked until they performed a hard refresh.

To Test:

  1. Payment Flow: Make a payment on your test site and verify that after success, the URL updates with a timestamp query parameter and the page reload shows unlocked content immediately.
  2. Login Flow: Complete the login process and ensure the URL includes the cache-busting parameter. Confirm that the UI of the sticky header is changed and you see the Profile and Logout buttons.

@xecdev xecdev requested a review from Klakurka February 19, 2025 15:13
@Klakurka Klakurka merged commit 606f441 into master Feb 19, 2025
@xecdev xecdev deleted the feat/implement-cache-busting-mechanism branch February 20, 2025 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants