Cookies API
E856242
The Cookies API is a web browser mechanism that allows websites to store, send, and manage small pieces of data associated with user sessions and preferences via HTTP cookies.
Statements (50)
| Predicate | Object |
|---|---|
| instanceOf |
Web browser API
ⓘ
Web technology ⓘ |
| availableIn | JavaScript NERFINISHED ⓘ |
| bestPractice |
avoid storing sensitive data directly in cookies
ⓘ
use HttpOnly flag to protect cookies from JavaScript access ⓘ use SameSite attribute to mitigate CSRF ⓘ use Secure flag for HTTPS-only cookies ⓘ |
| constrainedBy |
browser cookie size limits
ⓘ
per-domain cookie count limits ⓘ privacy regulations such as GDPR ⓘ same-origin policy (for access from scripts) ⓘ |
| dataStoredAs |
name-value pairs
ⓘ
string values ⓘ |
| exposesInterface | document.cookie ⓘ |
| lifecycle |
persistent cookies
ⓘ
session cookies ⓘ |
| operatesIn | web browsers ⓘ |
| operatesOver | HTTP NERFINISHED ⓘ |
| relatedTo |
Fetch API (via cookie handling in requests)
NERFINISHED
ⓘ
IndexedDB API NERFINISHED ⓘ Web Storage API NERFINISHED ⓘ |
| securityConcern |
cross-site request forgery (CSRF)
ⓘ
cross-site scripting (XSS) exploitation of non-HttpOnly cookies ⓘ session hijacking ⓘ |
| standardizedIn | HTTP State Management Mechanism specifications NERFINISHED ⓘ |
| supportsAttribute |
Domain
GENERATED
ⓘ
Expires GENERATED ⓘ HttpOnly GENERATED ⓘ Max-Age GENERATED ⓘ Path GENERATED ⓘ SameSite GENERATED ⓘ Secure GENERATED ⓘ |
| supportsOperation |
create cookie
ⓘ
delete cookie ⓘ read cookie ⓘ update cookie ⓘ |
| technologyType |
HTTP state management mechanism
ⓘ
client-side storage mechanism ⓘ |
| usedFor |
associating data with user sessions
ⓘ
basic analytics and tracking ⓘ implementing login sessions ⓘ managing HTTP cookies ⓘ personalization of web content ⓘ reading cookie data from HTTP responses ⓘ remembering user settings ⓘ sending cookie data with HTTP requests ⓘ session management ⓘ storing small pieces of data in the browser ⓘ storing user preferences ⓘ tracking user state between page loads ⓘ |
Referenced by (1)
Full triples — surface form annotated when it differs from this entity's canonical label.