Prevent caching of Ajax requests for the events queue

Created on 23 January 2023, almost 2 years ago

Problem/Motivation

We came across a number of occasions where events were re-triggered by the user using the browser to go back a page or refresh a page.

Steps to reproduce

One example is:

  1. Visit a product category page and select a product
  2. Add the product to the cart
  3. Press the browser back button - still the product page
  4. Press the browser - the product category appears and both visit product page and add to cart events get resent

Proposed resolution

Edit the EventsController::getEvents method called by Ajax calls to set the cache control header to include no-store.

Remaining tasks

More testing and if approved commit (I have supplied a proposed patch)

User interface changes

None

API changes

None

Data model changes

None

Feature request
Status

Active

Component

Code

Created by

🇬🇧United Kingdom Rory Downes

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024