Cookies
The Cookies plugin is specifically designed to implement web cookies in your application projects to store data in small text files on user devices. Features include creating, reading, fetching, checking and deleting cookies, for games built in Construct 3.
The Cookies plugin covers all the features in JavaScript with support for all commonly used browsers.
The Cookies plugin supports all platforms including web, desktop, mobile, instant games, playable ads, etc., through the application browser or webview.
Introduction
The Construct Master Collection supports the full and easy integration of HTML 5 SDKs for web applications in web, mobile and desktop browsers, for both Construct 3 and Construct 2.
Please click here to learn more about Web.
Features
The Cookies plugin is specifically designed to implement web cookies in your application projects to store data in small text files on user devices. Features include creating, reading, fetching, checking and deleting cookies, for games built in Construct 3.
The Cookies plugin covers all the features in JavaScript with support for all commonly used browsers.
The Cookies plugin supports all platforms including web, desktop, mobile, instant games, playable ads, etc., through the application browser or webview.
Here are some of the web features of the web plugin:
JavaScript Cookies
Create cookies
Update or overwrite cookies
Read cookies
Check if cookie exists
Get cookie value from key
Delete cookie
Additional features
Set expiry
Set path
Delete in path
Through the Cookies plugin, you can use the web cookies feature while web worker mode is enabled.
Well maintained and fully tested for production release.
For more information about web application features, please click here to learn the introductory lessons to Web.
Platform Integration
Here are some of the platforms that are natively supported:
All platforms supported by Construct 3.
Web
Mobile Web
Desktop
Android
iOS
Build Support
Here are some of the supported build options:
Web
Desktop
NW.js
Windows (WebView2)
macOS (WKWebView)
Mobile
Android Studio
Xcode
Phonegap
Construct 3 Build Service
Construct Arcade
Editor Features
Here are some of the features in the Construct editor:
Construct 3
How to use?
It is easy to use the Cookies plugin, you will only need to follow the steps below.
1. The first step is to add the Cookies object into the project.
Documentation
Here are the following official documentation and guides into using JavaScript Cookies.
Actions, Conditions & Expressions
Actions
The following action groups:
General
Features
General
Set cookie - Create a cookie with a key, value, expiry timestamp and path.
Key - The key of the cookie.
Value - The value of the cookie.
Expiry (Days) - The time duration in days before expiration. Leave an empty or any string to unspecify.
Path - The path of the cookie. Leave blank to unspecify.
Delete cookie - Delete a cookie.
Key - The key of the cookie to delete.
Path - The path of the cookie. Leave blank to unspecify.
Get cookie - Get a cookie value from a key.
Key - The key of the cookie to fetch.
Features
Check Cookie - Check if a cookie exists from a key.
Key - The key of the cookie to check.
Conditions
The following condition groups:
General
Features
General
On get - Callback trigger condition fires upon fetching the cookie value.
Key - The key of the fetched cookie.
On set - Callback trigger condition fires upon setting the cookie.
Key - The key of the set cookie.
On delete - Callback trigger condition fires upon deleting the cookie.
Key - The key of the deleted cookie.
On any get - Callback trigger condition fires upon fetching a cookie value.
On any set - Callback trigger condition fires upon setting a cookie.
On any delete - Callback trigger condition fires upon deleting a cookie.
Features
On check - Callback condition trigger fires after checking if a cookie exists.
Key - The key of the cookie to check existence.
State - Compare the existence of the cookie.
Expressions
The following expression groups:
General
General
CookieKey - Return the current cookie key of a callback event trigger condition.
CookieValue - Return the current cookie value of callback event trigger conditions "On get cookie" and "On check cookie".
Showcase
There is currently nothing to show, we will add more in the future.
Game Projects
Instructions Kit
Specifications
-
Instructions - The game project contains instructions and steps on how to use the addon and its features.
-
Action, Conditions and Expressions - It covers the implementation of each action, condition and expression.
-
Tips and Tricks - It provides some tips and tricks on the recommended ways of using the addon.