A cookie is a small data record stored by the browser for a website and sent with matching HTTP requests. In Joomla, a cookie can connect a visitor’s requests to a session or retain particular preferences.
Lifetime and scope
A server sets a cookie through Set-Cookie. Domain and Path restrict matching requests, while Max-Age or Expires specify storage lifetime. A session cookie has no explicit persistent expiry, but browser session restoration can retain it after a window closes.
Security attributes
Secure restricts transmission to secure connections. HttpOnly blocks JavaScript access to the cookie but does not prevent every consequence of XSS. SameSite controls cross-site transmission and helps reduce CSRF risk. Its value must suit login and external integration workflows.
Cookies, sessions and localStorage
A session is application interaction state. A cookie often holds its identifier while the data resides on the server. localStorage is a different browser store: it is accessible to page scripts and is not automatically sent with every HTTP request.
Cookies in Joomla
Joomla’s Remember Me feature can use a persistent login mechanism. This should be distinguished from ordinary session expiry. Behaviour depends on enabled plugins and site settings.
When diagnosing login problems, check domain scope, HTTPS, cookie lifetime and browser restrictions. Never publish session cookie values, which can grant account access. Consent for analytics or advertising cookies is a separate issue from Joomla’s technical configuration.
Summary
Cookies help a Joomla website preserve state across requests. Their purpose, lifetime and attributes must match the actual workflow.