You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WordPress adds <link> elements pointing to previous and next pages, in wp_head().
Rel: wp-includes/default-filters.php:204 add_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
WooCommerce's logout URL is handled through a page.
Therefore, when viewing a page adjacent to the logout page, WordPress adds the logout url in the header, like <link rel='prev' title='Logout' href='http://www.example.com/logout/' />
Firefox tries to prefetch that page, and since the page is essentially visited, you get logged out.
Possible solutions
Hook on _{$adjacent}post_rel_link filter, check if it's the logout url, and return nothing (or something else) if it is.
Change the way WooCommerce handles logouts.
Add option to unhook adjacent_posts_rel_link_wp_head
Convince WordPress to drop adjacent_posts_rel_link_wp_head completely.
Convince Firefox to drop prefetching completely.
Hope this helps :)
The text was updated successfully, but these errors were encountered:
There is a case where you get logged out/session cleared/cart emptied, due to a combination of WooCommerce + WordPress + Firefox.
Firefox uses prefetching.
https://developer.mozilla.org/en-US/docs/Link_prefetching_FAQ
WordPress adds
<link>
elements pointing to previous and next pages, inwp_head()
.Rel: wp-includes/default-filters.php:204
add_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
WooCommerce's logout URL is handled through a page.
Therefore, when viewing a page adjacent to the logout page, WordPress adds the logout url in the header, like
<link rel='prev' title='Logout' href='http://www.example.com/logout/' />
Firefox tries to prefetch that page, and since the page is essentially visited, you get logged out.
Possible solutions
Hope this helps :)
The text was updated successfully, but these errors were encountered: