Skip to content

xiarimangguo/sciter-cookie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

sciter-cookie

This is a cookie interface implemented from Sciter with js, using Sciter's Storage object to store data, allowing Sciter to support the cookie function like a browser.

Sciter is a C++-based GUI framework that allows you to quickly build GUI applications using C++ and HTML.

Switch languages

中文

Use

Load from CDN

Insert the following code in the HTML page that needs to use the Cookie component to get started.

<script src="https://cdn.jsdelivr.net/gh/xiarimangguo/sciter-cookie@zipped/cookie.js" type="module"></script>

Load from local file

Download cookie.js and put it in your project folder.
Insert the following code in the HTML page that needs to use the Cookie component to get started.

<script src="file://path/to/cookie.js" type="module"></script>

Don't forget to change the file path to the file location of cookie.js.

Features

Cookies

sciter-cookie supports the basic functionality of Cookie.

document.cookie

Use document.cookie to read and store cookies.

You can manipulate the document.cookie property normally the way you would in your browser.

For usage, please refer to MDN.

Cookies object

sciter-cookie provides you with a Cookie object to easily manipulate cookies.

Please refer to the Basic Usage section of js-cookie for usage.

However, this Cookie object does not fully implement all the functions of js-cookie, and only supports the three basic operations of set get remove.

If you want to use the full version of js-cookie, please override the window.Cookies object and include js-cookie in your project.

localStorage

sciter-cookie supports the basic functionality of localStorage.
You can manipulate the localStorage property normally the way you would in a browser.

For usage, please refer to MDN.

sessionStorage

sciter-cookie supports the basic functionality of sessionStorage.
You can manipulate the sessionStorage property normally the way you would in a browser.

For usage, please refer to MDN.

About

This project is developed by @xiarimangguo.

If you think this project is very convenient, don't forget to light up the star for me~