1. Home
  2. Advanced Usage
  3. Prevent caching the coupon on a product

Prevent caching the coupon on a product

When a customer enters a valid coupon on your product’s checkout, or accesses your product from the coupon URL when you are automatically applying a coupon to a checkout, we persist this coupon for them.

This means that if they refresh the page, or click the back button and then return again, their coupon will still be applied and ready for them.

If you want to prevent this, forcing customer’s to re-enter the discount code, you can simply add a parameter to the query string when sending people to your cart.

Here are some simple examples:

https://myaccount.thrivecart.com/my-product/?coupon=DISCOUNT

Default behaviour: this is a standard coupon URL. The ‘DISCOUNT’ coupon will be applied automatically and then remembered if the customer clicks back and then returns later.

https://myaccount.thrivecart.com/my-product/?coupon_cache=false

If the user clicks this link, then enters a valid coupon themselves, and then leave the checkout, it will not get saved and they would have to re-enter it if they return to the checkout.

https://myaccount.thrivecart.com/my-product/?coupon=DISCOUNT&coupon_cache=false

If the user clicks this link, the ‘DISCOUNT’ coupon will be applied to their checkout automatically. If they then leave the checkout, it will not be saved and they would have to re-enter it again or visit via the link that originally sent them.

Frequently Asked Questions (FAQs)

  • Q: Why is the discount always showing when I preview my checkout?
    • A: ThriveCart uses cookies to remember discount codes in a user’s browser. If you have previewed your checkout and entered a discount code previously, the next time you view your checkout that coupon code will be applied. We recommend viewing your checkout from an incognito/guest browser to mimic what a first-time user will see when accessing your checkout URL.

      To prevent this from happening for customers, you’ll want to add the “/?coupon_cache=false” to the end of your checkout URL.
  • Q: Is there a way to set this with an embedded checkout?
    • A: As long as you are not including a coupon code in your embed code, and require customers to enter a coupon code in checkout each time, you could use the data-thrivecart-querystring=”coupon_cache=false” variable in your checkouts embed code and this would forget the applied coupon code when the customer returns to the page your checkout is embedded on.
Updated on November 26, 2025
Was this article helpful?

Related Articles