Page Speed: Minimize cookie size (deprecated) More Recommendations

Rule Summary

Cookie
Low
Moderate
100%

Overview

Keeping cookies as small as possible ensures that an HTTP request can fit into a single packet.

Note: This rule was merged into the Minimize request size rule in Page Speed 1.10.

How does your site score on this rule?

recommends:

Use server-side storage for most of the cookie payload

Store only a unique identifier in the cookie, and key the ID to data stored at the server end. You can use server-side cookies for both session and persistent cookies by specifying the expiry date/time on the cookie.

Remove unused or duplicated cookie fields

The fields set by a cookie at the top-level path of a domain (i.e. /) are inherited by the resources served off all paths below that domain. Therefore, if you are serving different applications on different URL paths, and you have a field that applies globally to all applications on a domain - for example, a user's language preference - include that field in the cookie set at the top-level domain; don't duplicate the field in cookies set for subpaths. Conversely, if a field only applies to an application served from a subpath - for example, a UI setting - don't include that field in the top-level cookie and force the unused data to be passed needlessly for other applications.

Read More

Contribute to this recommendation

Have an opinion, link, or other contribution to share regarding this recommendation? Share it with us and help make the web a faster place!