Skip to content

isCookieEnabled

The isCookieEnabled function checks if cookies are enabled in the user's browser.

Syntax

typescript
isCookieEnabled(): boolean;

Parameters

NameTypeDescription
This function does not take any parameters

Returns

NameTypeDescription
booleantrue if cookies are enabled

Examples

typescript
isCookieEnabled();
// => true

Notes

  • Useful for checking if it is possible to store data via cookies.

References

Released under the MIT License.