{"id":2014,"date":"2022-07-16T11:20:16","date_gmt":"2022-07-16T02:20:16","guid":{"rendered":"http:\/\/www.agile-software.site\/?p=2014"},"modified":"2022-07-17T08:52:02","modified_gmt":"2022-07-16T23:52:02","slug":"sessionstorage","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=2014","title":{"rendered":"sessionStorage"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u30bb\u30c3\u30b7\u30e7\u30f3\u3068\u306f<\/h2>\n\n\n\n<p><strong>\u30bb\u30c3\u30b7\u30e7\u30f3\u3068\u306f\u3001\u5e83\u7fa9\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u7528\u8a9e\u3067\u300c\u4e00\u9023\u306e\u51e6\u7406\u306e\u306f\u3058\u307e\u308a\u304b\u3089\u7d42\u308f\u308a\u300d\u3092\u793a\u3059\u6982\u5ff5\u306e\u3053\u3068\u3092\u8a00\u3044\u307e\u3059\u3002<\/strong><\/p>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001Web\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u305d\u306e\u30da\u30fc\u30b8\u304b\u3089\u51fa\u308b\u3068\u3044\u3046\u4e00\u9023\u306e\u51e6\u7406\u304c\u3042\u3063\u305f\u5834\u5408\u3001\u3053\u308c\u30921\u3064\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3068\u3057\u3066\u8003\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u901a\u5e38\u306e\u5834\u5408\u3001EC\u30b5\u30a4\u30c8\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u5546\u54c1\u3092\u8cb7\u3044\u7269\u30ea\u30b9\u30c8\u306b\u8ffd\u52a0\u3057\u3001\u8cfc\u5165\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3044\u3063\u305f\u51e6\u7406\u304c\u3042\u308c\u3070\u3001\u753b\u9762\u304c\u5207\u308a\u66ff\u308f\u308b\u3054\u3068\u306b\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u30ea\u30bb\u30c3\u30c8\u3055\u308c\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u60c5\u5831\u306a\u3069\u304c\u5931\u308f\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u4eca\u56de\u7d39\u4ecb\u3059\u308b\u3001\u72ed\u7fa9\u306e\u610f\u5473\u3067\u306esession\uff08\u30bb\u30c3\u30b7\u30e7\u30f3\uff09\u3068Cookie\uff08\u30af\u30c3\u30ad\u30fc\uff09\u3068\u3044\u3046\u4ed5\u7d44\u307f\u3092\u4f7f\u3048\u3070\u3001PHP\u3067\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u3092Web\u30b5\u30fc\u30d0\u30fc\u306b\u4fdd\u6301\u3057\u3001\u4e0a\u8a18\u306e\u51e6\u7406\u3092\u4e00\u9023\u306e\u3082\u306e\u3068\u3057\u3066\u6271\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>Cookie\u3082session\u3082\u4f7f\u3044\u9053\u306f\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001Cookie\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306b\u60c5\u5831\u304c\u4fdd\u5b58\u3055\u308c\u308b\u306e\u306b\u5bfe\u3057\u3001session\u306f\u30b5\u30fc\u30d0\u30fc\u5074\u306b\u60c5\u5831\u304c\u4fdd\u5b58\u3055\u308c\u308b\u3068\u3044\u3046\u9055\u3044\u304c\u3042\u308a\u307e\u3059\u3002<\/strong><\/p>\n\n\n\n<p>Cookie\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\uff08\u30d6\u30e9\u30a6\u30b6\uff09\u306b\u60c5\u5831\u304c\u4fdd\u5b58\u3055\u308c\u308b\u4e0a\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u3092\u64cd\u4f5c\u3059\u308c\u3070\u4fdd\u6301\u3055\u308c\u305f\u500b\u4eba\u60c5\u5831\u3092\u76d7\u307f\u898b\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u305f\u3081\u3001\u91cd\u8981\u306a\u60c5\u5831\u3092\u4fdd\u5b58\u3059\u308b\u306e\u306b\u306f\u5411\u3044\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>session\u306fCookie\u306e\u3088\u3046\u306b\u4fdd\u5b58\u671f\u9593\u3092\u6c7a\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u305a\u3001\u300cWeb\u30d6\u30e9\u30a6\u30b6\u3092\u9589\u3058\u308b\u307e\u3067\u3057\u304b\u60c5\u5831\u3092\u4fdd\u6301\u3067\u304d\u306a\u3044\u300d\u3068\u3044\u3046\u5236\u9650\u304c\u5b58\u5728\u3057\u307e\u3059\u304c\u3001\u305d\u306e\u5206Cookie\u306b\u6bd4\u3079\u5b89\u5168\u306b\u60c5\u5831\u3092\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">sessionStorage<\/h2>\n\n\n\n<p>sessionStorage\u306f\u3001Web\u30da\u30fc\u30b8\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d9a\u3044\u3066\u3044\u308b\u9593\u3001\u60c5\u5831\u3092\u4fdd\u5b58\u3057\u3066\u304a\u3051\u308b\u30d6\u30e9\u30a6\u30b6\u306e\u4fdd\u5b58\u9818\u57df\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u901a\u5e38JavaScript\u3067\u4fdd\u6301\u3055\u308c\u3066\u3044\u308b\u5909\u6570\u306a\u3069\u306e\u60c5\u5831\u306f\u3001\u30da\u30fc\u30b8\u3092\u518d\u8aad\u307f\u8fbc\u307f\u3059\u308b\u3068\u30ea\u30bb\u30c3\u30c8\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>sessionStorage\u3092\u4f7f\u3046\u3068\u3001\u30da\u30fc\u30b8\u3092\u9589\u3058\u3066\u3082\u305d\u306e\u30d6\u30e9\u30a6\u30b6\u30a6\u30a3\u30f3\u30c9\u30a6\u3001\u3082\u3057\u304f\u306f\u30bf\u30d6\u3092\u9589\u3058\u306a\u3044\u9650\u308a\u3001\u60c5\u5831\u3092\u4fdd\u6301\u3057\u7d9a\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4fdd\u5b58\u3059\u308b\u30c7\u30fc\u30bf\u306e\u5f62\u5f0f\u306f\u3001JavaScript\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u3088\u3046\u306b\u30ad\u30fc\u3068\u5024\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u8a00\u3044\u63db\u3048\u308b\u3068\u3001\u300c\u30c7\u30fc\u30bf\u306e\u540d\u524d\u300d\u3068\u300c\u30c7\u30fc\u30bf\u300d\u3068\u3044\u3046\u5f62\u3067\u7ba1\u7406\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u3001sessionStorage\u306e\u4f7f\u3044\u65b9\u3068\u3057\u3066\u300c\u4fdd\u5b58\u3059\u308b\u300d\u300c\u53d6\u5f97\u3059\u308b\u300d\u300c\u524a\u9664\u3059\u308b\u300d\u306e3\u3064\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">sessionStorage\u306b\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>sessionStorage.setItem(&#39;\u30ad\u30fc&#39;, &#39;\u5024&#39;)<\/code><\/pre><\/div>\n\n\n\n<p>sessionStorage\u306fJavaScript\u306e\u7d44\u307f\u8fbc\u307f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308b\u305f\u3081\u3001\u4f55\u3082\u5b9a\u7fa9\u3057\u306a\u304f\u3066\u3082sessionStorage\u3068\u8a18\u8ff0\u3059\u308c\u3070\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u306b\u306f\u3001setItem\u30e1\u30bd\u30c3\u30c9\u306b\u30ad\u30fc\u3068\u5024\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u305f\u969b\u3001\u6307\u5b9a\u3055\u308c\u305f\u30ad\u30fc\u304c\u5b58\u5728\u3057\u306a\u3051\u308c\u3070\u65b0\u898f\u306b\u4f5c\u6210\u3057\u3001\u3059\u3067\u306b\u5b58\u5728\u3057\u3066\u3044\u308c\u3070\u65e2\u5b58\u306e\u5024\u3092\u4e0a\u66f8\u304d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>sessionStorage\u306e\u30c7\u30fc\u30bf\u306e\u5024\u306b\u306f\u6587\u5b57\u5217\u3057\u304b\u6307\u5b9a\u3067\u304d\u306a\u3044\u70b9\u306b\u7559\u610f\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">sessionStorage\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>sessionStorage.getItem(&#39;\u30ad\u30fc&#39;)<\/code><\/pre><\/div>\n\n\n\n<p>\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001getItem\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u306b\u53d6\u5f97\u3057\u305f\u3044\u30c7\u30fc\u30bf\u306e\u30ad\u30fc\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>setItem\u30e1\u30bd\u30c3\u30c9\u3068\u5bfe\u306b\u306a\u308b\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u899a\u3048\u3066\u3057\u307e\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">sessionStorage\u304b\u3089\u30c7\u30fc\u30bf\u3092\u524a\u9664\u3059\u308b<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>sessionStorage.removeItem(&#39;\u30ad\u30fc&#39;)<\/code><\/pre><\/div>\n\n\n\n<p>\u30c7\u30fc\u30bf\u306e\u524a\u9664\u306b\u306fremoveItem\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>getItem\u3068\u540c\u69d8\u3001\u5f15\u6570\u306b\u524a\u9664\u3057\u305f\u3044\u30c7\u30fc\u30bf\u306e\u30ad\u30fc\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528\u3057\u306a\u304f\u306a\u3063\u305f\u30c7\u30fc\u30bf\u3092\u660e\u793a\u7684\u306b\u524a\u9664\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u306e\u6df7\u5728\u3092\u9632\u3050\u3068\u3068\u3082\u306bsessionStorage\u306e\u9818\u57df\u3092\u7121\u99c4\u306b\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30bb\u30c3\u30b7\u30e7\u30f3\u3068\u306f \u30bb\u30c3\u30b7\u30e7\u30f3\u3068\u306f\u3001\u5e83\u7fa9\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u7528\u8a9e\u3067\u300c\u4e00\u9023\u306e\u51e6\u7406\u306e\u306f\u3058\u307e\u308a\u304b\u3089\u7d42\u308f\u308a\u300d\u3092\u793a\u3059\u6982\u5ff5\u306e\u3053\u3068\u3092\u8a00\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001Web\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u305d\u306e\u30da\u30fc\u30b8\u304b\u3089\u51fa\u308b\u3068\u3044\u3046\u4e00\u9023\u306e\u51e6\u7406\u304c\u3042\u3063\u305f\u5834\u5408\u3001\u3053\u308c\u30921\u3064\u306e\u30bb\u30c3<\/p>\n","protected":false},"author":1,"featured_media":2077,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[19],"tags":[],"class_list":["post-2014","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2014"}],"version-history":[{"count":1,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2014\/revisions"}],"predecessor-version":[{"id":2015,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2014\/revisions\/2015"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/media\/2077"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}