Features Pricing GDPR cookie banner Google Consent Mode v2 WordPress plugin Cookiebot alternative For Agencies GDPR ePrivacy About Contact
RO | EN
Start Free →
Preferences

recently_viewed_product (Magento) – what this cookie does

recently_viewed_product is a localStorage entry used by the Magento e-commerce platform to display products a shopper has recently visited. It is not a classic HTTP cookie, but the ePrivacy Directive treats it the same way because it stores data on the user's device.

Name
recently_viewed_product
Provider
Magento
Category
Preferences
Type
localStorage
Lifetime
Persistent
Consent
Yes, before it is set (GDPR / ePrivacy)

What is the recently_viewed_product cookie?

recently_viewed_product is created by Magento's built-in „Recently Viewed Products” feature, available in both Magento Open Source and Adobe Commerce. It appears once a visitor opens one or more product pages on a Magento-powered store.

Because many Magento stores rely on full-page caching (Varnish/Magento Full Page Cache), personalized content like a recently-viewed list cannot be generated server-side for each visitor. Magento therefore builds it in the browser with JavaScript, using localStorage instead of a cookie sent to the server.

What data it stores

The entry typically holds a list of recently viewed products: product ID, name, URL, image and price — enough to render the „Recently viewed” block without a fresh server request each time. The exact format (JSON structure, number of items kept) varies by Magento version and theme, so it cannot be fully generalized.

Unlike a cookie, this data is not automatically sent to the server with every HTTP request; it is read by JavaScript directly from the browser, and the store may periodically call its own domain to sync the list.

What it is used for

The purpose is purely functional/commercial: it lets the store show shoppers the products they've already looked at, which helps navigation and can influence purchase decisions. For the merchant, it's a standard personalization feature, not a cross-site tracking or advertising tool.

Does it require consent?

In CookieFix's classification, recently_viewed_product falls under preferences (functional). Even though it is not an HTTP cookie, ePrivacy (implemented in Romania via Law 506/2004) and GDPR apply to any storage of information on a user's device, including localStorage.

  • It is not strictly necessary to complete an order, so it generally requires the visitor's prior consent.
  • Site owners must list it in their cookie policy, with purpose, provider (Magento/the store's own platform) and duration.
  • Consent should be collected before the related JS module writes data to localStorage.

How to block or delete recently_viewed_product

Visitors can clear localStorage from browser settings (e.g. Chrome/Firefox: Settings → Privacy → Clear site data) or from developer tools (Application/Storage → Local Storage), or browse in private/incognito mode.

On the site side, administrators should block the script that generates recently_viewed_product until consent is given. A consent management platform such as CookieFix can automatically block this script — and the resulting localStorage write — until the visitor agrees to the „preferences” category.

Frequently asked questions

Technically it's a localStorage entry, not an HTTP cookie, but ePrivacy rules treat it the same way as a cookie because it stores data on the user's device.

By clearing site data from your browser's privacy settings, or via developer tools under the Local Storage section.

No, it's a personalization feature rather than something strictly necessary for browsing or checkout, which is why it falls under the preferences category.

Because it's written directly by JavaScript into the browser's localStorage, it isn't sent by the server through a Set-Cookie header.

Updated 7 September 2026 · Information comes from the provider’s public documentation and CookieFix scans; it is not legal advice.