cookie, localStorage, sessionStorage

cookie, localStorage, sessionStorage

Comparison

Name Description Size Life
Cookie Small piece of text data filed by server and saved in browser and carried in every request. Mostly used for identifying user. 4KB User defined expiration. Default cleared on browser close.
localStorage Permanent storage for each domain. Not used in request. 5MB Permanent, unless cleared.
sessionStorage Transient storage for each domain. Not used in request. 5MB Available in current session. Cleared when tab or browser closed/refreshed.
Read more
CORS and withCredentials
Javascript this && Javascript Class VS Function
Pug

Pug

Ref

  1. Pug - getting started

What and why

  • Pug is an html template engine which simplies html coding.
  • Pug‘s predecessor is the well-known jade.
Read more
Bulma
JWT Based Authorization
Snippets Collection
SQLite

SQLite

What and Why

  • SQLite is not comparable with big client/server databases like Oracle, MySQL, PostgreSQL.
  • SQLite is a file-based, simple, economical, reliable RDBMS.
Read more
Chocolotey - Package Manager for Windows

Chocolotey - Package Manager for Windows

On Linux/*nix, we have apt-get to manage packages and softwares.
On Mac, we have brew.
Is there any equivalent for Windows?
Yes, it’s chocolatey.
With chocolatey, finding a package or software is no longer prohibitive in Windows, and also no need to worry about malwares or viruse.

Read more
Overcome the Wall

Overcome the Wall

Living in China you just have to make a lot of effort to overcome the GFW(aka, Great Firewall).

Personally I strongly recommend Monocloud to accelerate network access in China. Running the client will start a proxy running on 7078 port based on TCP and UDP protocol. Meanwhile it also turns on proxy in internet settings:

Internet settings proxy

The following walkthrough presumes that you have started monocloud.

Read more