ãã¼ã«ã«ã¹ãã¬ã¼ã¸ã«ä¿åããããã¼ã¿ãChromeä¸ã§ç¢ºèªããæ¹æ³ã JavaScriptã§localStorage.setItemãsessionStorage.setItemãªã©ã使ã£ã¦ä¿åãããã¼ã¿ã¯ãã©ã¦ã¶Chromeä¸ã§ç¢ºèªãå¤æ´ãåé¤ãªã©ãåºæ¥ã¾ããä»åã¯ãã¼ã«ã«ã¹ãã¬ã¼ã¸ã«ãã¼ã¿ãä¿åããã¦ãããã®ã¨ãã¦è§£èª¬ãã¾ãã ã¾ãã¯ããµã¤ãä¸ã§å³ã¯ãªãã¯ãã¦æ¤è¨¼ãé¸æã Applicationã¿ããé¸æããã 注ï¼ã¿ãåã«Elements, Console, Sourcesãªã©ã¨è¡¨ç¤ºããã¦ããã¯ããApplicationã¨ããé ç®ã¯é ãã¦ããå¯è½æ§ãããã®ã§â«ãã¯ãªãã¯ãã¦é ããã¿ãã表示ãã¦Applicationãé¸æããã Storageã¨ããé ç®ã«Local StorageãSession Storageã¨ããé ç®ãããã®ã§ã¯ãªãã¯ãé層以ä¸ã«ã¢ãããã¼ãå ã®URLã表示ããã¦
æ¦è¦ åèè ã®è¨±è«¾ãå¾ã¦ç¿»è¨³ã»å ¬éãããã¾ãã è±èªè¨äº: Randall Degges - Please Stop Using Local Storage åæå ¬éæ¥: 2018/01/26 èè : Randall Degges æ¥æ¬èªã¿ã¤ãã«ã¯å 容ã«å³ãããã®ã«ãã¾ããã ç»åã¯å è¨äºããã®å¼ç¨ã§ãã åçå ¬é: 2019/10/19 追è¨æ´æ°: 2024/04/05 -- ãªã³ã¯æ å ±ãè¨äºæ«å°¾ã«ç§»åãã¾ãã æ¬æ°ã§ç³ãä¸ãã¾ããlocal storageã使ããªãã§ãã ããã local storageã«ã»ãã·ã§ã³æ å ±ãä¿åããéçºè ãããã»ã©å¤ãçç±ã«ã¤ãã¦ãç§ã«ã¯ãã£ã±ãè¦å½ãã¤ãã¾ããããããã©ããªçç±ã§ããããã®ææ³ã¯å°ä¸ããæ¶ãã¦ãªããªã£ã¦ãããå¿ è¦ãããã¾ãããæããã«æã«è² ããªããªãã¤ã¤ããã¾ãã ç§ã¯æ¯æ¥ã®ããã«ãéè¦ãªã¦ã¼ã¶ã¼æ å ±ãlocal storageã«ä¿åã
åæï¼âThere is no simple solution for local storageâ (on March 5, 2012 by Chris Heilmann) è¦ç´ï¼ç§ãã¡ã¯è¯ããã¼ã¿ã¹ãã¢ã¨ãã¦Â localStorage ãæ¨å¥¨ããã®ããããªããã°ãªããªããããã©ã¼ãã³ã¹ãã²ã©ãæãªãããããã ããããæ®å¿µãªãã¨ã«ã代ããã¨ãªããã®ã¯ã¾ã å®å ¨ã«ãµãã¼ãããã¦ããããã¾ãç°¡åã«å®è£ ã§ãããã®ã§ããªãã Web éçºã«ããã¦ããã¾ããã話ã«åºããããã¨ã¯å¸¸ã ã ããããã£ããã®ã®ããã¤ãã¯è¯ããã®ã§ãã ãããããããããã¹ã¦ãã¨ãã¦ç®ç«ã£ã¦ãã¾ããéçºè ã使ãããã«ä»åãã¦ãã¾ããããããå¤ãã®å ´åãè¯ãã¨æããã¦ãããã®ã¯ããã¾ã§è¯ããã®ã§ã¯ãªããã¾ãããã°ãã使ã£ã¦ã¿ã¦ã¯ããã¦ãééã£ã¦ãããã¨æ°ã¥ãããããã®ãªã®ã ã ãããªãã®ã®ã²ã¨ã¤ã«ãlocalStorage ããã
å®è£ localStorageãç¨ãã¦å®è£ ãã¦ã¿ãï¼ cacheHandler.jsã§ãã£ãã·ã¥ãæ±ãå¦çãç¨æï¼ main.jsã§ï¼ãã£ãã·ã¥ã«ãã¼ã¿ããªããã°ï¼åå¾ãï¼ãã£ãã·ã¥ã«ä¿åããï¼ [code language="javascript" title="cacheHandler.js"]<br />/**<br /><%%KEEPWHITESPACE%%> * ã³ã³ã¹ãã©ã¯ã¿ã§ãï¼<br /><%%KEEPWHITESPACE%%> * @constructor<br /><%%KEEPWHITESPACE%%> */<br />function CacheHandler() {<br />}<br /><br />/**<br /><%%KEEPWHITESPACE%%> * HTML5 localStorage ãããã¼ã«å¯¾å¿ãããã¼ã¿ãåå¾ãã¾ãï¼<br /><%%KEEP
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}