-
Notifications
You must be signed in to change notification settings - Fork 1
Improve bfcache invalidation via BroadcastChannel, store token in user session, promote feature on login #5
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a mechanism to invalidate pages restored from closed tabs by persisting the bfcache session token in a hidden input field. The changes involve updating JavaScript logic to read and compare this token on pageshow events and modifying PHP to render and pass the necessary data. My review highlights some functional limitations and a UI inconsistency related to the new hidden input field.
Using sessionStorage is more reliable than hoping a browser will persist a value in an input field after back/forward navigation or restoring a closed tab, but it doesn't solve the problem of detecting a regular navigation.
2fafde1 to
4184193
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request refactors the bfcache invalidation logic to be more robust by using user session data and introduces a new mechanism using BroadcastChannel to evict pages from bfcache. It also enhances the login screen with a popover to inform users about the instant navigation feature. The changes are well-structured and improve the plugin's functionality. My review includes suggestions to fix a documentation link, align a comment with its implementation, remove an unused import, and improve cookie security.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
/gemini review |
|
/gemini summary |
Summary of ChangesThis pull request enhances the browser Back/Forward Cache (bfcache) handling for authenticated WordPress users, focusing on improved privacy and user experience. It introduces a new invalidation mechanism using Highlights
Changelog
Activity
|
No description provided.