This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* Component for utilizing local storage. It provides backup plan, if no WebStorage is available on client | |
* | |
*We support html5 storage, and cookie store if webStorage is not available. | |
* | |
*Cookies | |
* Are for older browsers only. A "session" cookie (one without expiration data) is available in all windows | |
* that have access to that domain until the browser is shut down. This is bad. | |
* 4096 chars limit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<title>Tests </title> | |
<style type="text/css"> | |
div.results b { | |
color: green; | |
} | |
div.results b[class='err'] { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Boiler plate code is usually consisted of simple patterns. Once you master them, there is no need for readability. It should be as compact as possible, to preserve space for the real implementation code. For example: | |
// adding interface "storage" to namespace "AppHtml5" | |
if (window.AppHtml5) | |
window.AppHtml5.storage = { "save" : {}, "load" : {}}; | |
else { | |
window.AppHtml5 = {}; | |
window.AppHtml5.storage = {}; | |
window.AppHtml5.storage = { "save" : {}, "load" : {}}; |
NewerOlder