Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
litespeed_wiki:cache:litemage:troubleshooting:javascript-global-var-problem [2016/05/06 14:11]
Michael Alegre created
litespeed_wiki:cache:litemage:troubleshooting:javascript-global-var-problem [2016/05/09 20:34]
Long Hu
Line 1: Line 1:
-====== ​JavaScript ​global variable ​problem ​======+====== ​Private data showing on public cache content due to JS global variable ​issue ======
  
-If a global variable in JavaScript is initialized based on user session data and saved in a public cache, then it will cause trouble for other users with differing session data.+**Problem**:​ Private data showing ​on public cache content
  
-As of version 1.0.2, a place holder block for JavaScript variables has been introduced. This place holder is a private block, so every user will get his/her own correct value. ​+**Cause**: Some global variables in JavaScript is initialized based on user session data but saved in a public cache 
 + 
 +**Solution**: ​As of version 1.0.2, a place holder block for JavaScript variables has been introduced. This place holder is a private block, so every user will get his/her own correct value. ​
  
 Check the code: Check the code:
Line 10: Line 12:
 </​code>​ </​code>​
  
-You can also write your own code to customize this block. Please be sure to keep a copy of your customized code in a local directory to avoid it being overridden during LiteMage updates. ​+**Extend**: ​You can also write your own code to customize this block. Please be sure to keep a copy of your customized code in a local directory to avoid it being overridden during LiteMage updates. ​
  
 You generally do not need to modify the block code and can instead just modify the template associated with that block. You generally do not need to modify the block code and can instead just modify the template associated with that block.
  • Admin
  • Last modified: 2017/05/08 20:33
  • by Lisa Clarke