{"id":311254,"date":"2024-05-20T22:10:45","date_gmt":"2024-05-20T14:10:45","guid":{"rendered":""},"modified":"2024-05-20T22:10:56","modified_gmt":"2024-05-20T14:10:56","slug":"html5-%e4%b8%ad%e7%9a%84-localstorage-%e6%80%8e%e4%b9%88%e8%bf%90%e7%94%a8","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/311254.html","title":{"rendered":"HTML5 \u4e2d\u7684 localStorage \u600e\u4e48\u8fd0\u7528"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26231923\/412f809b-177c-4bcf-8868-01b7bbf04b31.webp\" alt=\"HTML5 \u4e2d\u7684 localStorage \u600e\u4e48\u8fd0\u7528\" \/><\/p>\n<p><p><strong>HTML5 \u4e2d\u7684 localStorage \u662f\u4e00\u79cd\u5728\u5ba2\u6237\u7aef\u5b58\u50a8\u7528\u6237\u4fe1\u606f\u7684\u65b9\u5f0f\u3001\u5177\u6709\u8de8\u4f1a\u8bdd\u6301\u4e45\u6027\u3001\u4f7f\u7528\u7b80\u5355\u3002<\/strong> \u5b83\u8ba9\u6570\u636e\u5b58\u50a8\u53d8\u6210\u4e86\u4e00\u4ef6\u5bb9\u6613\u7684\u4e8b\u60c5\uff0c\u5b58\u653e\u5728\u5ba2\u6237\u7aef\u672c\u5730\uff0c\u53ef\u4ee5\u7528\u6765\u5b58\u50a8\u548c\u68c0\u7d22\u7531\u7f51\u9875\u8bbe\u7f6e\u7684\u952e\u503c\u5bf9\u3002\u5176\u4e2d\uff0clocalStorage \u548c\u4f1a\u8bdd\u5b58\u50a8\uff08sessionStorage\uff09\u4e00\u6837\uff0c\u90fd\u662f\u4fdd\u5b58\u5728\u6d4f\u89c8\u5668\u7aef\u7684\u5b58\u50a8\u673a\u5236\uff0c\u4f46\u4e0d\u540c\u7684\u662f\uff0c\u5c3d\u7ba1\u5b83\u5728\u9875\u9762\u91cd\u65b0\u52a0\u8f7d\u540e\u4ecd\u7136\u5b58\u5728\uff0c\u5b83\u4e5f\u53ef\u4ee5\u8de8\u8d8a\u591a\u4e2a\u7a97\u53e3\u5171\u4eab\u3002<strong>\u53e6\u5916\uff0clocalStorage \u63d0\u4f9b\u7684\u5b58\u50a8\u5bb9\u91cf\u4e00\u822c\u6bd4cookies\u5927\u5f97\u591a\uff0c\u901a\u5e38\u662f5MB<\/strong>\u4ee5\u4e0a\uff0c\u4f7f\u5f97\u6211\u4eec\u53ef\u4ee5\u5728\u4e0d\u4f9d\u8d56\u670d\u52a1\u5668\u7684\u60c5\u51b5\u4e0b\u7f13\u5b58\u5927\u91cf\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001LOCALSTORAGE \u4e0e SESSIONSTORAGE \u7684\u533a\u5206<\/h3>\n<\/p>\n<p><p>LocalStorage \u65e8\u5728\u63d0\u4f9b\u4e00\u79cd\u5c06\u6570\u636e\u6301\u4e45\u4fdd\u5b58\u5728\u5ba2\u6237\u7aef\u7684\u65b9\u5f0f\uff0c\u800csessionStorage \u5219\u662f\u4e3a\u4e86\u5728\u9875\u9762\u4f1a\u8bdd\u671f\u95f4\u4fdd\u5b58\u6570\u636e\u3002\u4f7f\u7528localStorage\u5b58\u50a8\u7684\u6570\u636e\u6ca1\u6709\u65f6\u95f4\u9650\u5236\uff0c\u5373\u4f7f\u5173\u95ed\u6d4f\u89c8\u5668\u6216\u8005\u91cd\u542f\u7cfb\u7edf\uff0c\u6570\u636e\u4ecd\u7136\u4f1a\u88ab\u4fdd\u7559\uff0c\u76f4\u5230\u901a\u8fc7 JavaScript \u6216\u7528\u6237\u6e05\u9664\u6d4f\u89c8\u5668\u7f13\u5b58\u3002\u76f8\u6bd4\u4e4b\u4e0b\uff0c\u4f7f\u7528sessionStorage\u5b58\u50a8\u7684\u6570\u636e\u5728\u9875\u9762\u4f1a\u8bdd\u7ed3\u675f\u65f6\u88ab\u6e05\u9664\uff0c\u5373\u6d4f\u89c8\u5668\u88ab\u5173\u95ed\u65f6\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001LOCALSTORAGE \u7684\u57fa\u672c\u7528\u6cd5<\/h3>\n<\/p>\n<p><p>\u57fa\u672c\u7528\u6cd5\u6d89\u53ca\u51e0\u4e2a\u5173\u952e\u7684API\u65b9\u6cd5\uff1a<code>setItem<\/code>\u3001<code>getItem<\/code>\u3001<code>removeItem<\/code> \u548c <code>clear<\/code>\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>setItem(key, value)<\/strong>: \u5c06\u6570\u636e\u4fdd\u5b58\u5230localStorage\uff0c\u63a5\u6536\u4e24\u4e2a\u53c2\u6570\uff0c\u952e\u548c\u503c\u3002\u952e\u662f\u7528\u4e8e\u540e\u7eed\u68c0\u7d22\u503c\u7684\u5b57\u7b26\u4e32\uff0c\u503c\u540c\u6837\u662f\u5b57\u7b26\u4e32\u3002<\/li>\n<li><strong>getItem(key)<\/strong>: \u4ecelocalStorage\u83b7\u53d6\u6570\u636e\uff0c\u63a5\u6536\u4e00\u4e2a\u53c2\u6570\uff0c\u5c31\u662f\u4e4b\u524d\u8bbe\u7f6e\u7684\u952e\uff0c\u8fd4\u56de\u5bf9\u5e94\u7684\u503c\u3002<\/li>\n<li><strong>removeItem(key)<\/strong>: \u5220\u9664localStorage\u4e2d\u7684\u6570\u636e\uff0c\u63a5\u6536\u4e00\u4e2a\u53c2\u6570\uff0c\u5373\u8981\u5220\u9664\u6570\u636e\u7684\u952e\u3002<\/li>\n<li><strong>clear()<\/strong>: \u6e05\u9664localStorage\u4e2d\u7684\u6240\u6709\u6570\u636e\u3002<\/li>\n<\/ul>\n<p><p><strong>\u5b9e\u9645\u5e94\u7528\u4e2d\u8fd8\u8981\u8003\u8651\u5b58\u50a8\u5bb9\u91cf\u9650\u5236\u548c\u5f02\u5e38\u5904\u7406<\/strong>\u7b49\u95ee\u9898\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">if (typeof(Storage) !== &quot;undefined&quot;) {<\/p>\n<p>    \/\/ \u4ee3\u7801<\/p>\n<p>} else {<\/p>\n<p>    \/\/ \u4e0d\u652f\u6301localStorage\u548csessionStorage<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5728WEB\u5e94\u7528\u4e2d\u7684\u8fd0\u7528\u573a\u666f<\/h3>\n<\/p>\n<p><p>LocalStorage \u5728Web\u5e94\u7528\u7a0b\u5e8f\u4e2d\u53ef\u4ee5\u6709\u591a\u79cd\u8fd0\u7528\u573a\u666f\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u4fdd\u5b58\u7528\u6237\u8bbe\u7f6e<\/strong>\uff1a\u6bd4\u5982\u7f51\u9875\u4e3b\u9898\u3001\u5b57\u4f53\u5927\u5c0f\u6216\u5e03\u5c40\u6837\u5f0f\u3002<\/li>\n<li><strong>\u5b58\u50a8\u8d2d\u7269\u8f66\u4fe1\u606f<\/strong>\uff1a\u7535\u5546\u7f51\u7ad9\u53ef\u901a\u8fc7localStorage\u4fdd\u5b58\u7528\u6237\u7684\u8d2d\u7269\u8f66\u4fe1\u606f\u3002<\/li>\n<li><strong>\u6e38\u620f\u5f97\u5206\u548c\u8fdb\u5ea6<\/strong>\uff1a\u6e38\u620f\u5e94\u7528\u53ef\u4ee5\u4fdd\u5b58\u7528\u6237\u7684\u6e38\u620f\u5f97\u5206\u6216\u6e38\u620f\u8fdb\u5ea6\u3002<\/li>\n<li><strong>\u8868\u5355\u6570\u636e\u81ea\u52a8\u586b\u5145<\/strong>\uff1a\u5b9e\u73b0\u8868\u5355\u5b57\u6bb5\u7684\u81ea\u52a8\u586b\u5145\u800c\u65e0\u9700\u670d\u52a1\u5668\u7aef\u7684\u5b58\u50a8\u3002<\/li>\n<\/ul>\n<p><h3>\u56db\u3001SECURITY AND PRIVACY CONSIDERATIONS<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528localStorage\u65f6\uff0c\u5fc5\u987b\u8003\u8651\u5230\u5b89\u5168\u548c\u9690\u79c1\u3002\u7531\u4e8e\u6570\u636e\u662f\u5728\u5ba2\u6237\u7aef\u4fdd\u5b58\u7684\uff0c\u6709\u53ef\u80fd\u906d\u53d7XSS\uff08\u8de8\u7ad9\u811a\u672c\u653b\u51fb\uff09\u5f71\u54cd\u3002\u56e0\u6b64\uff0c<strong>\u5bf9\u4e8e\u654f\u611f\u6570\u636e\uff0c\u5efa\u8bae\u4e0d\u8981\u5b58\u50a8\u5728localStorage\u4e2d<\/strong>\u3002\u6b64\u5916\uff0c\u9762\u4e34\u7f51\u9875\u5185\u5bb9\u5b89\u5168\u653f\u7b56\uff08CSP\uff09\u7684\u9650\u5236\uff0c\u5bf9\u4e8e\u4f7f\u7528\u7684localStorage API\u5e94\u8be5\u91c7\u7528\u5408\u7406\u7684\u5b89\u5168\u7b56\u7565\u6765\u9632\u62a4\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001LOCALSTORAGE \u7684\u64cd\u4f5c\u6280\u5de7<\/h3>\n<\/p>\n<p><p>\u5728\u65e5\u5e38\u4f7f\u7528\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u6280\u5de7\u6765\u4f18\u5316localStorage\u7684\u4f7f\u7528\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>JSON\u5e8f\u5217\u5316<\/strong>\uff1a\u7531\u4e8e\u6240\u6709\u7684\u5b58\u50a8\u503c\u5fc5\u987b\u4e3a\u5b57\u7b26\u4e32\uff0c\u975e\u5b57\u7b26\u4e32\u6570\u636e\u7c7b\u578b\u9700\u8981\u8f6c\u5316\u4e3aJSON\u5b57\u7b26\u4e32\u3002<\/li>\n<li><strong>\u8fc7\u671f\u65f6\u95f4\u8bbe\u7f6e<\/strong>\uff1a\u867d\u7136localStorage\u672c\u8eab\u4e0d\u652f\u6301\u8fc7\u671f\u65f6\u95f4\uff0c\u4f46\u53ef\u4ee5\u5728\u5b58\u50a8\u7684\u503c\u4e2d\u8bbe\u7f6e\u4e00\u4e2a\u65f6\u95f4\u6233\uff0c\u5e76\u901a\u8fc7\u4ee3\u7801\u5b9a\u65f6\u68c0\u67e5\u6765\u6a21\u62df\u8fc7\u671f\u7279\u6027\u3002<\/li>\n<li><strong>\u5b58\u50a8\u7a7a\u95f4\u4f18\u5316<\/strong>\uff1a\u53ca\u65f6\u6e05\u7406\u4e0d\u5fc5\u8981\u7684\u6570\u636e\uff0c\u907f\u514d\u5360\u636e\u8fc7\u591a\u7a7a\u95f4\uff0c\u63d0\u9ad8\u5e94\u7528\u6027\u80fd\u3002<\/li>\n<\/ul>\n<p><h3>\u516d\u3001LOCALSTORAGE \u7684\u5c40\u9650\u6027<\/h3>\n<\/p>\n<p><p>\u5c3d\u7ba1localStorage\u5f88\u6709\u7528\uff0c\u4f46\u4e5f\u6709\u5c40\u9650\u6027\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u5b58\u50a8\u5bb9\u91cf\u9650\u5236<\/strong>\uff1a\u5927\u90e8\u5206\u6d4f\u89c8\u5668\u90fd\u67095MB\u7684\u5b58\u50a8\u9650\u5236\uff0c\u5927\u578b\u6570\u636e\u96c6\u5408\u4e0d\u9002\u5408\u653e\u5728localStorage\u4e2d\u3002<\/li>\n<li><strong>\u540c\u6e90\u653f\u7b56<\/strong>\uff1alocalStorage\u5728\u4e0d\u540c\u7684\u57df\u4e4b\u95f4\u65e0\u6cd5\u4e92\u76f8\u8bfb\u53d6\u6570\u636e\u3002<\/li>\n<li><strong>\u6027\u80fd\u8003\u8651<\/strong>\uff1a\u9891\u7e41\u64cd\u4f5clocalStorage\u53ef\u80fd\u4f1a\u5f71\u54cd\u7f51\u7ad9\u7684\u6027\u80fd\uff0c\u5c24\u5176\u662f\u5728\u8bfb\u5199\u5927\u91cf\u6570\u636e\u65f6\u3002<\/li>\n<\/ul>\n<p><h3>\u4e03\u3001\u6d4f\u89c8\u5668\u652f\u6301\u4e0e\u517c\u5bb9\u6027<\/h3>\n<\/p>\n<p><p>\u51e0\u4e4e\u6240\u6709\u73b0\u4ee3\u6d4f\u89c8\u5668\u90fd\u652f\u6301localStorage\uff0c\u5bf9\u4e8e\u90a3\u4e9b\u4e0d\u652f\u6301\u6216\u5c40\u90e8\u652f\u6301\u7684\u60c5\u51b5\uff0c\u53ef\u4ee5\u4f7f\u7528polyfills\u6765\u8865\u5145\u3002\u5bf9\u4e8e\u8fc7\u65f6\u7684\u6d4f\u89c8\u5668\u7248\u672c\uff0c\u8003\u8651\u4f7f\u7528cookie\u6765\u66ff\u4ee3\u5b9e\u73b0\u76f8\u4f3c\u7684\u529f\u80fd\uff0c\u4f46\u8fd9\u9700\u8981\u5904\u7406cookie\u7684\u5927\u5c0f\u548c\u6570\u91cf\u9650\u5236\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u7ed3\u5408\u73b0\u4ee3\u6846\u67b6\u4e2d\u4f7f\u7528LOCALSTORAGE<\/h3>\n<\/p>\n<p><p>\u5728Vue\u3001React\u7b49\u73b0\u4ee3\u6846\u67b6\u4e2d\uff0c\u6709\u5bf9localStorage\u8fdb\u884c\u5c01\u88c5\u7684\u5e93\uff0c\u5982vue-localstorage\u3001redux-persist\u7b49\u3002\u8fd9\u4e9b\u5e93\u63d0\u4f9b\u66f4\u7b80\u5355\u7684API\u548c\u989d\u5916\u7684\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h3>\u4e5d\u3001BEST PRACTICES AND PERFORMANCE<\/h3>\n<\/p>\n<p><p>\u4e3a\u786e\u4fdd\u6700\u4f73\u5b9e\u8df5\u548c\u6027\u80fd\uff0c\u5f00\u53d1\u8005\u5e94\u907f\u514d\u5c06localStorage\u7528\u4e8e\u5927\u578b\u6570\u636e\u5b58\u50a8\u3001\u654f\u611f\u4fe1\u606f\u4fdd\u5b58\uff0c\u540c\u65f6\uff0c\u5e94\u8be5\u5b9a\u671f\u6e05\u7406\u65e0\u7528\u7684\u5b58\u50a8\u6570\u636e\uff0c\u907f\u514d\u6ee5\u7528\u5bfc\u81f4\u7684\u6d4f\u89c8\u5668\u7aef\u6027\u80fd\u95ee\u9898\u3002<\/p>\n<\/p>\n<p><p>\u603b\u800c\u8a00\u4e4b\uff0c<strong>HTML5\u7684localStorage\u7684\u8fd0\u7528\u4e3aWeb\u5f00\u53d1\u8005\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5f3a\u5927\u3001\u65b9\u4fbf\u7684\u6570\u636e\u5b58\u50a8\u5de5\u5177<\/strong>\uff0c\u4f46\u5728\u4f7f\u7528\u65f6\u8fd8\u5fc5\u987b\u6ce8\u610f\u6570\u636e\u7684\u5b89\u5168\u6027\u548c\u5b58\u50a8\u5bb9\u91cf\u7684\u9650\u5236\u7b49\u95ee\u9898\u3002\u5408\u7406\u5229\u7528localStorage\u5c06\u5927\u5927\u589e\u5f3aWeb\u5e94\u7528\u7684\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. localStorage \u662f\u4ec0\u4e48\uff1f\u5b83\u6709\u4ec0\u4e48\u7528\u9014\uff1f<\/strong><br \/>\nlocalStorage \u662f HTML5 \u63d0\u4f9b\u7684\u4e00\u79cd\u7528\u4e8e\u5728\u7f51\u9875\u4e2d\u5b58\u50a8\u548c\u83b7\u53d6\u6570\u636e\u7684\u673a\u5236\u3002\u4e0e\u4f20\u7edf\u7684 Cookie \u4e0d\u540c\uff0clocalStorage \u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u957f\u671f\u4fdd\u5b58\u6570\u636e\uff0c\u5373\u4f7f\u7528\u6237\u5173\u95ed\u6d4f\u89c8\u5668\u4e5f\u4e0d\u4f1a\u4e22\u5931\u6570\u636e\u3002\u5b83\u5728\u7f51\u9875\u5f00\u53d1\u4e2d\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5b9e\u73b0\u672c\u5730\u5b58\u50a8\u3001\u7f13\u5b58\u6570\u636e\u3001\u4fdd\u5b58\u7528\u6237\u504f\u597d\u8bbe\u7f6e\u7b49\u529f\u80fd\u3002<\/p>\n<p><strong>2. \u5982\u4f55\u4f7f\u7528 localStorage \u5b58\u50a8\u6570\u636e\uff1f<\/strong><br \/>\n\u8981\u4f7f\u7528 localStorage \u5b58\u50a8\u6570\u636e\uff0c\u9996\u5148\u9700\u8981\u4f7f\u7528 <code>localStorage.setItem(&quot;key&quot;, &quot;value&quot;)<\/code> \u65b9\u6cd5\u5c06\u6570\u636e\u4fdd\u5b58\u5230 localStorage \u4e2d\uff0c\u5176\u4e2d key \u8868\u793a\u6570\u636e\u7684\u952e\uff0cvalue \u8868\u793a\u6570\u636e\u7684\u503c\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u5c06\u4e00\u4e2a\u540d\u4e3a &quot;username&quot; \u7684\u6570\u636e\u5b58\u50a8\u5230 localStorage \u4e2d\uff1a<\/p>\n<pre><code>localStorage.setItem(&quot;username&quot;, &quot;John&quot;);\n<\/code><\/pre>\n<p>\u4e4b\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>localStorage.getItem(&quot;key&quot;)<\/code> \u65b9\u6cd5\u6765\u83b7\u53d6 localStorage \u4e2d\u7684\u6570\u636e\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u83b7\u53d6\u4e4b\u524d\u5b58\u50a8\u7684\u7528\u6237\u540d\uff1a<\/p>\n<pre><code>var username = localStorage.getItem(&quot;username&quot;);\nconsole.log(username); \/\/ \u8f93\u51fa: &quot;John&quot;\n<\/code><\/pre>\n<p><strong>3. \u5982\u4f55\u5220\u9664\u548c\u6e05\u7a7a localStorage \u4e2d\u7684\u6570\u636e\uff1f<\/strong><br \/>\n\u8981\u5220\u9664 localStorage \u4e2d\u7684\u7279\u5b9a\u6570\u636e\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>localStorage.removeItem(&quot;key&quot;)<\/code> \u65b9\u6cd5\uff0c\u5176\u4e2d key \u8868\u793a\u8981\u5220\u9664\u7684\u6570\u636e\u7684\u952e\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u5220\u9664\u4e4b\u524d\u5b58\u50a8\u7684\u7528\u6237\u540d\uff1a<\/p>\n<pre><code>localStorage.removeItem(&quot;username&quot;);\n<\/code><\/pre>\n<p>\u5982\u679c\u8981\u6e05\u7a7a\u6574\u4e2a localStorage\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>localStorage.clear()<\/code> \u65b9\u6cd5\u3002\u8fd9\u5c06\u5220\u9664 localStorage \u4e2d\u7684\u6240\u6709\u6570\u636e\uff0c\u614e\u7528\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u6e05\u7a7a localStorage\uff1a<\/p>\n<pre><code>localStorage.clear();\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"HTML5 \u4e2d\u7684 localStorage \u662f\u4e00\u79cd\u5728\u5ba2\u6237\u7aef\u5b58\u50a8\u7528\u6237\u4fe1\u606f\u7684\u65b9\u5f0f\u3001\u5177\u6709\u8de8\u4f1a\u8bdd\u6301\u4e45\u6027\u3001\u4f7f\u7528\u7b80\u5355\u3002 \u5b83 [&hellip;]","protected":false},"author":3,"featured_media":311269,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/311254"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=311254"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/311254\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/311269"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=311254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=311254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=311254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}