📜 ⬆️ ⬇️

JFStorage: Cookies Alternative

Inspired by Topics Alternative to cookies via java script

The use of cookies is limited to 4 kb. size, they are also visible to the user.
When using Flash Storage, reading cookies is a bit more complicated and allows you to store up to 100 kb and above data on the user's computer.

Management is very simple:


setCookie(key,value) -
getCookie(key) -
removeCookie(key) -
isExistCookie(key) - ?

Size: 3 kb.
Demo: jfstorage.agrr.org/JFStorage.html
Google Code: code.google.com/p/jfstorage

Technology


The part working with SharedObject is taken from ntt.cc/2008/07/13/the-source-code-of-actionscript-3-cookie-class-enables-you-to-read-write-and-edit-shared-objects- on-the-user-hard-disk.html and a bit processed file.
The interaction between javascript and flash is written by me. Standard libraries used.
')

How can I use?


As a repository of hidden data.
Like big data storage.
As a way of offline data loading.

Source: https://habr.com/ru/post/29376/


All Articles