What Are the Cookie Limitations You Should Know?

April 15, 2025

– 2 minute read

Learn about cookie size and storage limits. Explore challenges, data management strategies, and alternatives like local storage and server-side solutions.

Cormac O’Sullivan

Author

Cookies play a pivotal role in ensuring a seamless browsing experience. They enable web servers to store information on a user’s device, facilitating features like remembering login credentials or maintaining a shopping cart. However, cookies come with certain limitations that can impact their functionality and effectiveness.

1. Technical Limitations

Size Restrictions

Cookies are small pieces of data - so small, their maximum size is just 4,096 bytes of data. In practice, this is an even smaller amount of data once header information is included. That’s enough for an ID or a small amount of text, but not for detailed customer profiles or multi-step shopping cart data.

Exceeding this limit can cause data to be cut off, leading to broken sessions or incomplete carts.

Per-Domain Storage Limits

Web browsers also limit the total number of cookies and total storage space per domain - typically 20–50 cookies and around 4 KB in total. When this cap is reached, older cookies are overwritten.

In multi-function websites (e.g., loyalty + analytics + personalisation), important cookies can be lost, disrupting customer recognition and rewards tracking.

Expiration Dates

Cookies have a set lifespan. While some can last years, privacy features like Safari’s Intelligent Tracking Preventionand Firefox’s Enhanced Tracking Protection can shorten third-party cookie lifespans to just 24 hours. Chrome is also phasing out third-party cookies entirely.

Long-term tracking becomes unreliable, breaking attribution and loyalty tracking across weeks or months.

2. Privacy and Compliance Issues

Consent Requirements

Regulations like GDPR and CCPA require explicit opt-in for non-essential cookies, and users can revoke consent at any time. Businesses often end up with incomplete datasets, making it harder to personalise experiences or measure engagement accurately.

Security Risks

Cookies are vulnerable to attacks such as cross-site scripting (XSS) and session hijacking if not implemented securely. Businesses can avoid this by only storing minimal identifiers in cookies and keeping sensitive data on secure servers.

3. Performance Considerations

Cookies are sent with every HTTP request to the same domain. If your site sets too many or makes them too large, this can slow page loads - especially for mobile users on slower connections. Slower load times lead to higher bounce rates and reduced engagement, particularly harmful for loyalty-driven businesses.

Smarter Alternatives to Cookies

Browser cookies have their place, but relying on them as your sole tracking method is increasingly risky. To build a reliable, privacy-compliant customer engagement strategy, businesses are turning to other technologies that avoid the size, storage, and lifespan constraints of cookies.

Local Storage and Session Storage

HTML5 introduced local storage and session storage as part of the Web Storage API. Both offer significantly more space than cookies - up to 5 MB in most browsers - and data stored here isn’t sent with every HTTP request, reducing bandwidth usage and improving performance.

  • Local storage persists even after the browser is closed, making it useful for remembering settings or offline data.

  • Session storage lasts only for the duration of the browser session, ideal for temporary data that shouldn’t linger.

These are useful for client-side enhancements, but they’re not secure enough for sensitive information and still live only on the customer’s device.

Server-Side Storage

Server-side storage keeps all critical customer data - such as session details, loyalty balances, and engagement history - securely on your own infrastructure. The browser holds only a small identifier (such as a session token) to connect the customer to their server-side profile.

This approach removes size limits, protects data from being wiped if the customer clears their browser, and makes it easier to apply security measures and compliance rules centrally.

First-Party Tracking with Unique IDs

First-party tracking stores a minimal cookie or local storage entry containing just a unique identifier. All meaningful customer data is tied to that ID on the server, enabling a complete customer profile without relying on multiple, heavy cookies.

This is exactly how Leat operates as a unified loyalty platform. When a customer engages with your brand - whether in-store, online, via kiosk, or through a partner channel - Leat assigns and recognises a single ID that follows them across all touchpoints. That ID links to a unified record containing their purchase history, points balance, and engagement data, updated in real time through 50+ integrations with POS, e-commerce, and marketing platforms.

This way, businesses get the full picture of your customer’s journey without depending on fragile browser cookies. Even if they clear their browser data or switch devices, their profile remains intact and up to date.

Token-Based Authentication (JWTs)

JSON Web Tokens (JWTs) offer a compact, secure way to transmit information between parties. A JWT can carry essential session data or authorisation claims in a digitally signed format, meaning the server can verify its authenticity without having to store state.

JWTs are particularly useful for single sign-on (SSO) systems and API authentication, and they reduce the need for multiple cookies by bundling required information into a single, verifiable token.

Conclusion

Cookies are essential in web development but have strict size and storage limits. Developers must understand these constraints and use complementary technologies to create efficient applications. By combining cookies with alternatives like server-side storage or tokens, developers can enhance functionality and user experience. Proper management of cookies ensures smoother workflows, whether for maintaining shopping carts or user sessions, while avoiding performance and compliance issues.

Do you want to know how Leat can help you grow? Cormac O’Sullivan can tell you how.

Book a demo with Cormac O’Sullivan or one of our other experts, they can tell you all about it.

Make every customer count.

Sign up and boost your business in less than 1 minute.

Make every customer count.

Sign up and boost your business in less than 1 minute.

Make every customer count.

Sign up and boost your business

in less than 1 minute.