X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML DOM cookie Property

Document Object Reference Document Object

Example

Return the cookies associated with the current document:

document.cookie;

Try it yourself »


Definition and Usage

The cookie property sets or returns all name/value pairs of cookies in the current document.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The cookie property is supported in all major browsers.


Syntax

document.cookie

Technical Details

Return Value: A string containing the name/value pairs of cookies in the document
DOM Version Core Level 2 Document Object


Document Object Reference Document Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook