Of course, right after submitting it I find out the cause for the issue:
The problem is caused by FireFox prefetching the other post in the background, resulting in those noticed 2 different postIDs per single page request.
If I disable prefetching, then it behaves as expected, so will need to add code to check for the prefetch header sent by FireFox and avoid updating the session data in such a case.
For more info on FireFox’s prefetch, see here: http://developer.mozilla.org/en/Link_prefetching_FAQ
Related Posts:
- Custom query form submission pagination
- Custom post type search using $_SESSION and pre_get_posts
- $_SESSION Not working after X amount of page views
- Combining queries with different arguments per post type
- Create a shortcode to display custom post types with a specific taxonomy
- custom slug for custom post type
- importing third party json feed as custom post type [closed]
- List the categories under custom taxonomy
- register_post_type & ‘register_meta_box_cb’ argument
- Returning search results by relevance, including Custom Post Types
- Custom Post Type Archives with 0 Posts Redirects as 404
- How to replicate some of Drupal Views functionality in WordPress?
- Archive page with multiple taxonomies rewrite
- WP Rest API Querying Custom Posts by ACF fields
- display multiple term post from taxonomy in a single page
- Dynamic variable for custom taxonomy in loop?
- Display posts of child category in template
- Custom Post Type rewrite redirects to homepage
- Displaying a specific post in a wp query by post id
- What hook should be used to programmatically create a post only when master post is updated?
- How to show post title outside of loop? [closed]
- Prevent author role from editing all posts in custom post type?
- Query custom post types
- WordPress rewrite my URL when i use pagination
- Adding a Gutenberg-like custom field on a custom post type
- How to add a custom taxonomy to a custom post type’s document tab
- WP_Query search posts by custom post type and custom taxonomy
- get_queried_object error How to show post count by month in the taxonomy page
- How can I change the title of an Add New page in Admin for custom post type
- Page Templates Drop Down Select for Custom Post Types
- Modifying date filter on admin page for custom post type to link to custom field
- How to call a custom post type with WP_query
- get custom post type thumbnail
- Deleting Custom Post type data using mySQL command
- Featured Images does not show in custom post type
- Update menu when saving settings
- I did group my search results by post type, but how can i give each of them its own order?
- How do I create custom fields for multiple post types?
- custom post type parsed as attachment
- How can I made custom taxonomies relationship?
- How to start a new post with custom Taxonomies already set?
- How to add rewrite rule to custom post type with parent in url with cpt ui?
- How to prevent a CPT’s slug and page slug from conflicting with each other?
- Display correctly using metabox.io
- How to Add multiple instance of meta box to custom post type
- comment_form() not showing on custom post type
- Manage Columns : order by post_parent’s title
- Different rewrite rules for taxonomies and cp in multisite?
- How to hook one custom post-types post to another?
- Limiting posts_join, where, etc to a specific WP_Query object?
- What is the ID parameter for custom post types in query_posts?
- Number of posts in the archive
- If there is only one post (show elements) else (show other elements)
- Add Previous/Next Buttons to CPT Single Pages Only
- Custom Post Types Archives and Single Pages not showing custom taxonomy data
- How to setup a single post page for my custom post type?
- Dynamically insert code to custom post type loop
- Custom Post Type Category URL
- Link From Single Post To Taxonomy Term Archive Page
- Do I need to use another custom post type for 1 post that differs from all of the others?
- fetch custom post by meta key if key value is does not know
- Get image from external URL
- Increasing the default number of posts in custom post types
- Better approach for a WordPress Inventory
- Showing all posts and custom post types by using one category
- Issue with Custom Post Types and Single
- Echo custom post meta from options array
- Filtering the_content, but still need to display the unfiltered content inside filter
- how to redirect to a custom post template
- WP not recognizing custom post type / template
- Displaying Portfolio Filter by Category Order (alphabetically)
- Function to add custom HTML into head in custom post-type list page
- How to create subdomain for custom post type and associated custom taxonomies
- What is the parameter : ‘Customs-fields’
- Get previous and next custom post by custom field
- Should I use a custom taxonomy or custom post type for grouping a list of panels associated with a group of tests?
- Show only Current category and sub category of custom post wordpress
- Creating post template for a Custom Post Type
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- Why are custom taxonomies only appearing on the edit page of one of these types, but not the other?
- Add Custom Field in Product in WP Admin and send to Order Webhook
- Taxonomies are not showing in the category dropdown
- Add Pagination in custom Blog page template
- get_the_terms child terms for current post/custom post only
- Unknown Post Meta Records
- Show Recently Viewed Custom Post to the visitor without plugin
- Custom Post Type Query by user id
- WordPress API only returning HTML
- select custom post type on regular post
- woocommerce post_type conflict with existing post type
- Post types showing tables…Can I do that?
- Weird capabilities / roles behavior
- How to change post status link order(priority) on cpt listing page
- Issue with permalinks for custom post type
- Setting a Master Menu on a Custom Post Type
- Linking from a list of custom post type items to a single – get_post_permalink not working correctly
- Remove plugin’s custom post type archive page and single pages [closed]
- After wp_insert_post() custom post type does not show in the admin
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs
- Show a wordpress custom post condtionally using a category term