this is for holding javascript data
Alec Aivazis edited JavaScript_has_a_problem_with__.html
over 8 years ago
Commit id: d51bf7d026f1f5dd0b493e95ea3782263c81555b
deletions | additions
diff --git a/JavaScript_has_a_problem_with__.html b/JavaScript_has_a_problem_with__.html
index 51a1091..1f3033c 100644
--- a/JavaScript_has_a_problem_with__.html
+++ b/JavaScript_has_a_problem_with__.html
...
JavaScript has a problem with global state.And this is exacerbated by the presence of the developers console. This problem is known by almost all JavaScript developers who have relied on global state. and is exacerbated by the presence of the developers console. It seems that we can apply the original solution to this problem in order to solve our storage issue. We can create a function that is available globally in the success handler of the xhr request which will returned the decrypted authentication information in a read-only manner. The global scope of the closure makes the unencrypted authentication data readable by anyone who requires it