awesome-interview/assets/js/c48aeec7.b9667d8f.js

1 line
16 KiB
JavaScript

"use strict";(self.webpackChunkjjbook=self.webpackChunkjjbook||[]).push([[2596],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return k}});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,p=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),h=s(n),k=a,m=h["".concat(p,".").concat(k)]||h[k]||c[k]||l;return n?r.createElement(m,o(o({ref:t},u),{},{components:n})):r.createElement(m,o({ref:t},u))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=h;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:a,o[1]=i;for(var s=2;s<l;s++)o[s]=n[s];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}h.displayName="MDXCreateElement"},47274:function(e,t,n){n.r(t),n.d(t,{assets:function(){return u},contentTitle:function(){return p},default:function(){return k},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return c}});var r=n(87462),a=n(63366),l=(n(67294),n(3905)),o=["components"],i={sidebar_label:"\u6d4f\u89c8\u5668\uff1a\u524d\u7aef\u8def\u7531\u5b9e\u73b0",sidebar_position:1},p="\u524d\u7aef\u8def\u7531\u5b9e\u73b0",s={unversionedId:"book4/browser-router",id:"book4/browser-router",title:"\u524d\u7aef\u8def\u7531\u5b9e\u73b0",description:"\u76f8\u5173\u95ee\u9898",source:"@site/docs/book4/browser-router.md",sourceDirName:"book4",slug:"/book4/browser-router",permalink:"/awesome-interview/book4/browser-router",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_label:"\u6d4f\u89c8\u5668\uff1a\u524d\u7aef\u8def\u7531\u5b9e\u73b0",sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"\u7efc\u5408\uff1a\u5982\u4f55\u51cf\u5c11\u767d\u5c4f\u7684\u65f6\u95f4",permalink:"/awesome-interview/book3/topic-white-screen-optimization"},next:{title:"\u6d4f\u89c8\u5668\uff1a\u672c\u5730\u5b58\u50a8\u65b9\u5f0f\u53ca\u573a\u666f",permalink:"/awesome-interview/book4/browser-local-storage"}},u={},c=[{value:"\u76f8\u5173\u95ee\u9898",id:"\u76f8\u5173\u95ee\u9898",level:2},{value:"\u56de\u7b54\u5173\u952e\u70b9",id:"\u56de\u7b54\u5173\u952e\u70b9",level:2},{value:"\u77e5\u8bc6\u70b9\u6df1\u5165",id:"\u77e5\u8bc6\u70b9\u6df1\u5165",level:2},{value:"1. Hash \u8def\u7531",id:"1-hash-\u8def\u7531",level:3},{value:"1.1 \u5b9e\u73b0\u539f\u7406",id:"11-\u5b9e\u73b0\u539f\u7406",level:4},{value:"1.2 \u4f18\u7f3a\u70b9",id:"12-\u4f18\u7f3a\u70b9",level:4},{value:"2. History \u8def\u7531",id:"2-history-\u8def\u7531",level:3},{value:"2.1 \u5b9e\u73b0\u539f\u7406",id:"21-\u5b9e\u73b0\u539f\u7406",level:4},{value:"2.2 \u4f18\u7f3a\u70b9",id:"22-\u4f18\u7f3a\u70b9",level:4},{value:"3. \u524d\u7aef\u8def\u7531\u7684\u4f18\u7f3a\u70b9",id:"3-\u524d\u7aef\u8def\u7531\u7684\u4f18\u7f3a\u70b9",level:3},{value:"\u53c2\u8003\u8d44\u6599",id:"\u53c2\u8003\u8d44\u6599",level:2}],h={toc:c};function k(e){var t=e.components,n=(0,a.Z)(e,o);return(0,l.kt)("wrapper",(0,r.Z)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"\u524d\u7aef\u8def\u7531\u5b9e\u73b0"},"\u524d\u7aef\u8def\u7531\u5b9e\u73b0"),(0,l.kt)("h2",{id:"\u76f8\u5173\u95ee\u9898"},"\u76f8\u5173\u95ee\u9898"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u8def\u7531\u662f\u4ec0\u4e48"),(0,l.kt)("li",{parentName:"ul"},"\u524d\u7aef\u8def\u7531\u7684\u5b9e\u73b0\u65b9\u5f0f\u548c\u5b9e\u73b0\u539f\u7406"),(0,l.kt)("li",{parentName:"ul"},"\u524d\u7aef\u8def\u7531\u548c\u670d\u52a1\u7aef\u8def\u7531\u7684\u533a\u522b"),(0,l.kt)("li",{parentName:"ul"},"\u524d\u7aef\u8def\u7531\u7684\u4f18\u52bf"),(0,l.kt)("li",{parentName:"ul"},"\u524d\u7aef\u8def\u7531\u7684\u4e0d\u8db3")),(0,l.kt)("h2",{id:"\u56de\u7b54\u5173\u952e\u70b9"},"\u56de\u7b54\u5173\u952e\u70b9"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"\u8def\u7531")," ",(0,l.kt)("inlineCode",{parentName:"p"},"Hash \u8def\u7531")," ",(0,l.kt)("inlineCode",{parentName:"p"},"History \u8def\u7531")," ",(0,l.kt)("inlineCode",{parentName:"p"},"\u65e0\u5237\u65b0")," ",(0,l.kt)("inlineCode",{parentName:"p"},"SPA\uff08Single-page application\uff0c\u5355\u9875\u9762 Web \u5e94\u7528\uff09")),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"\u8def\u7531\uff08routing\uff09\u5c31\u662f\u901a\u8fc7\u4e92\u8054\u7684\u7f51\u7edc\u628a\u4fe1\u606f\u4ece\u6e90\u5730\u5740\u4f20\u8f93\u5230\u76ee\u7684\u5730\u5740\u7684\u6d3b\u52a8\u3002 \u2014\u2014 \u7ef4\u57fa\u767e\u79d1")),(0,l.kt)("p",null,"\u5bf9\u4e8e Web \u5f00\u53d1\u6765\u8bf4\uff0c\u8def\u7531\u7684\u5b9e\u8d28\u662f URL \u5230\u5bf9\u5e94\u7684\u5904\u7406\u7a0b\u5e8f\u7684\u6620\u5c04\u3002"),(0,l.kt)("p",null,"Web \u8def\u7531\u65e2\u53ef\u4ee5\u7531\u670d\u52a1\u7aef\uff0c\u4e5f\u53ef\u4ee5\u7531\u524d\u7aef\u5b9e\u73b0\u3002\u5176\u4e2d\u524d\u7aef\u8def\u7531\u6839\u636e\u5b9e\u73b0\u65b9\u5f0f\u7684\u4e0d\u540c\uff0c\u53ef\u4ee5\u5206\u4e3a ",(0,l.kt)("strong",{parentName:"p"},"Hash \u8def\u7531")," \u548c ",(0,l.kt)("strong",{parentName:"p"},"History \u8def\u7531"),"\u3002"),(0,l.kt)("p",null,"\u524d\u7aef\u8def\u7531\u5bf9\u4e8e\u670d\u52a1\u7aef\u8def\u7531\u6765\u8bf4\uff0c\u6700\u663e\u8457\u7684\u7279\u70b9\u662f\u9875\u9762\u53ef\u4ee5\u5728\u65e0\u5237\u65b0\u7684\u60c5\u51b5\u4e0b\u8fdb\u884c\u9875\u9762\u7684\u5207\u6362\u3002\u57fa\u4e8e\u524d\u7aef\u8def\u7531\u7684\u8fd9\u4e00\u7279\u70b9\uff0c\u8bde\u751f\u4e86\u4e00\u79cd",(0,l.kt)("strong",{parentName:"p"},"\u65e0\u5237\u65b0"),"\u7684\u5355\u9875\u5e94\u7528\u5f00\u53d1\u6a21\u5f0f ",(0,l.kt)("strong",{parentName:"p"},"SPA"),"\u3002SPA \u901a\u8fc7\u524d\u7aef\u8def\u7531\u907f\u514d\u4e86\u9875\u9762\u7684\u5207\u6362\u6253\u65ad\u7528\u6237\u4f53\u9a8c\uff0c\u8ba9 Web \u5e94\u7528\u7684\u4f53\u9a8c\u66f4\u63a5\u8fd1\u4e00\u4e2a\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002"),(0,l.kt)("h2",{id:"\u77e5\u8bc6\u70b9\u6df1\u5165"},"\u77e5\u8bc6\u70b9\u6df1\u5165"),(0,l.kt)("p",null,"\u524d\u7aef\u8def\u7531\u6839\u636e\u5177\u4f53\u5b9e\u73b0\u65b9\u5f0f\u7684\u4e0d\u540c\uff0c\u53ef\u4ee5\u5206\u4e3a ",(0,l.kt)("strong",{parentName:"p"},"Hash \u8def\u7531")," \u548c ",(0,l.kt)("strong",{parentName:"p"},"History \u8def\u7531")," \u4e24\u79cd\uff0c\u8fd9\u4e24\u79cd\u5b9e\u73b0\u65b9\u5f0f\u5404\u6709\u5176\u4f18\u52bf\u548c\u5c40\u9650\u6027\u3002"),(0,l.kt)("h3",{id:"1-hash-\u8def\u7531"},"1. Hash \u8def\u7531"),(0,l.kt)("p",null,"\u4e00\u4e2a URI \u7684\u7ec4\u6210\u5982\u4e0b\u6240\u793a\u3002\u5176\u4e2d\u7684 fragment \u90e8\u5206\u5c31\u662f Hash \u8def\u7531\u6240\u8bfb\u53d6\u7684\u5185\u5bb9\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"}," foo://example.com:8042/over/there?name=ferret#nose\n \\_/ \\______________/\\_________/ \\_________/ \\__/\n | | | | |\n scheme authority path query fragment\n | _____________________|__\n / \\ / \\\n urn:example:animal:ferret:nose\n")),(0,l.kt)("p",null,"fragment \u672c\u8d28\u662f\u7528\u6765\u6807\u8bc6\u6b21\u7ea7\u8d44\u6e90\uff0cfragment \u6709\u4ee5\u4e0b\u7279\u70b9\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u4fee\u6539 fragment \u7684\u5185\u5bb9\u4e0d\u4f1a\u89e6\u53d1\u7f51\u9875\u91cd\u8f7d\u3002"),(0,l.kt)("li",{parentName:"ul"},"\u4fee\u6539 fragment \u7684\u5185\u5bb9\u4f1a\u6539\u53d8\u6d4f\u89c8\u5668\u7684\u5386\u53f2\u8bb0\u5f55\u3002"),(0,l.kt)("li",{parentName:"ul"},"\u4fee\u6539 fragment \u7684\u5185\u5bb9\u4f1a\u89e6\u53d1\u6d4f\u89c8\u5668\u7684 onhashchange \u4e8b\u4ef6\u3002")),(0,l.kt)("p",null,"\u57fa\u4e8e fragment \u7684\u4ee5\u4e0a\u7279\u70b9\uff0c\u53ef\u5b9e\u73b0\u57fa\u4e8e Hash \u7684\u524d\u7aef\u8def\u7531\u3002"),(0,l.kt)("h4",{id:"11-\u5b9e\u73b0\u539f\u7406"},"1.1 \u5b9e\u73b0\u539f\u7406"),(0,l.kt)("p",null,"\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u76d1\u542c hashchange \u4e8b\u4ef6\u6765\u76d1\u542c\u9875\u9762 hash \u7684\u53d8\u5316\uff0c\u901a\u8fc7\u89e3\u6790 hash \u7684\u503c\u6765\u5207\u6362\u9875\u9762\u3002\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'/**\n * \u89e3\u6790 hash\n * @param hash\n * @returns\n */\nfunction parseHash(hash) {\n // \u53bb\u9664 # \u53f7\n hash = hash.replace(/^#/, "");\n\n // \u7b80\u5355\u89e3\u6790\u793a\u4f8b\n const parsed = hash.split("?");\n\n // \u8fd4\u56de hash \u7684 path \u548c query\n return {\n pathname: parsed[0],\n search: parsed[1],\n };\n}\n\n/**\n * \u76d1\u542c hash \u53d8\u5316\n * @returns\n */\nfunction onHashChange() {\n // \u89e3\u6790 hash\n const { pathname, search } = parseHash(location.hash);\n\n // \u5207\u6362\u9875\u9762\u5185\u5bb9\n switch (pathname) {\n case "/home":\n document.body.innerHTML = `Hello ${search}`;\n return;\n default:\n return;\n }\n}\n\nwindow.addEventListener("hashchange", onHashChange);\n')),(0,l.kt)("h4",{id:"12-\u4f18\u7f3a\u70b9"},"1.2 \u4f18\u7f3a\u70b9"),(0,l.kt)("p",null,"Hash \u8def\u7531\u7531\u4e8e\u901a\u8fc7\u76d1\u542c hash \u53d8\u5316\u5b9e\u73b0\uff0c\u6240\u4ee5\u6709\u4ee5\u4e0b\u4f18\u52bf\u548c\u4e0d\u8db3\uff1a"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u4f18\u70b9")),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"\u517c\u5bb9\u6027\u6700\u4f73\u3002"),(0,l.kt)("li",{parentName:"ol"},"\u65e0\u9700\u670d\u52a1\u7aef\u914d\u7f6e\u3002")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u7f3a\u70b9")),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"\u670d\u52a1\u7aef\u65e0\u6cd5\u83b7\u53d6 hash \u90e8\u5206\u5185\u5bb9\u3002"),(0,l.kt)("li",{parentName:"ol"},"\u53ef\u80fd\u548c\u951a\u70b9\u529f\u80fd\u51b2\u7a81\u3002"),(0,l.kt)("li",{parentName:"ol"},"SEO \u4e0d\u53cb\u597d\u3002")),(0,l.kt)("h3",{id:"2-history-\u8def\u7531"},"2. History \u8def\u7531"),(0,l.kt)("p",null,"Hash \u8def\u7531\u662f\u4e00\u4e2a\u76f8\u5bf9\u201cHack\u201d\u7684\u65b9\u5f0f\uff0c\u5229\u7528\u4e86 fragment \u6765\u5b9e\u73b0\u8def\u7531\u529f\u80fd\u3002\u800c History \u8def\u7531\u5219\u662f\u901a\u8fc7\u6d4f\u89c8\u5668\u539f\u751f\u63d0\u4f9b\u7684\u64cd\u4f5c History \u7684\u80fd\u529b\u6765\u5b9e\u73b0\u7684\u8def\u7531\u529f\u80fd\u3002"),(0,l.kt)("h4",{id:"21-\u5b9e\u73b0\u539f\u7406"},"2.1 \u5b9e\u73b0\u539f\u7406"),(0,l.kt)("p",null,"History \u8def\u7531\u6838\u5fc3\u4e3b\u8981\u4f9d\u8d56 History API \u91cc\u7684\u4e24\u4e2a\u65b9\u6cd5\u548c\u4e00\u4e2a\u4e8b\u4ef6\uff0c\u5176\u4e2d\u4e24\u4e2a\u65b9\u6cd5\u7528\u4e8e\u64cd\u4f5c\u6d4f\u89c8\u5668\u7684\u5386\u53f2\u8bb0\u5f55\uff0c\u4e8b\u4ef6\u7528\u4e8e\u76d1\u542c\u5386\u53f2\u8bb0\u5f55\u7684\u5207\u6362\uff1a"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u65b9\u6cd5")),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"history.pushState\uff1a\u5c06\u7ed9\u5b9a\u7684 Data \u6dfb\u52a0\u5230\u5f53\u524d\u6807\u7b7e\u9875\u7684\u5386\u53f2\u8bb0\u5f55\u6808\u4e2d\u3002"),(0,l.kt)("li",{parentName:"ul"},"history.replaceState\uff1a\u5c06\u7ed9\u5b9a\u7684 Data \u66f4\u65b0\u5230\u5386\u53f2\u8bb0\u5f55\u6808\u4e2d\u6700\u65b0\u7684\u4e00\u6761\u8bb0\u5f55\u4e2d\u3002")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u4e8b\u4ef6")),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"popstate\uff1a\u76d1\u542c\u5386\u53f2\u8bb0\u5f55\u7684\u53d8\u5316\u3002")),(0,l.kt)("p",null,"\u901a\u8fc7\u4ee5\u4e0a API \u5373\u53ef\u5b9e\u73b0\u4e00\u4e2a\u524d\u7aef\u8def\u7531\uff0c\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'/**\n * \u76d1\u542c history \u53d8\u5316\n * @returns\n */\nfunction onHistoryChange() {\n // \u89e3\u6790 location\n const { pathname, search } = location;\n\n // \u6839\u636e\u9875\u9762\u4e0d\u540c\u6267\u884c\u4e0d\u540c\u5185\u5bb9\n switch (pathname) {\n case "/home":\n document.body.innerHTML = `Hello ${search.replace(/^\\?/, "")}`;\n return;\n default:\n document.body.innerHTML = `Hello World`;\n return;\n }\n}\n\n/**\n * \u9875\u9762\u8df3\u8f6c\n * @returns\n */\nfunction pushState(target) {\n history.pushState(null, "", target);\n onHistoryChange();\n}\n\n// 3 \u79d2\u540e\u8def\u7531\u8df3\u8f6c\nsetTimeout(() => {\n pushState("/home?name=HZFEStudio");\n}, 3000);\n\n// 6 \u79d2\u540e\u8fd4\u56de\nsetTimeout(() => {\n history.back();\n}, 6000);\n\nwindow.addEventListener("popstate", onHistoryChange);\n')),(0,l.kt)("h4",{id:"22-\u4f18\u7f3a\u70b9"},"2.2 \u4f18\u7f3a\u70b9"),(0,l.kt)("p",null,"History \u8def\u7531\u7531\u4e8e\u901a\u8fc7 History API \u5b9e\u73b0\uff0c\u6240\u4ee5\u6709\u4ee5\u4e0b\u4f18\u52bf\u548c\u4e0d\u8db3\uff1a"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u4f18\u70b9")),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"\u670d\u52a1\u7aef\u53ef\u83b7\u53d6\u5b8c\u6574\u7684\u94fe\u63a5\u548c\u53c2\u6570\u3002"),(0,l.kt)("li",{parentName:"ol"},"\u524d\u7aef\u76d1\u63a7\u53cb\u597d\u3002"),(0,l.kt)("li",{parentName:"ol"},"SEO \u76f8\u5bf9 Hash \u8def\u7531\u53cb\u597d\u3002")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u7f3a\u70b9")),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"\u517c\u5bb9\u6027\u7a0d\u5f31\u3002"),(0,l.kt)("li",{parentName:"ol"},"\u9700\u8981\u670d\u52a1\u7aef\u989d\u5916\u914d\u7f6e\uff08\u5404 path \u5747\u6307\u5411\u540c\u4e00\u4e2a HTML\uff09\u3002")),(0,l.kt)("h3",{id:"3-\u524d\u7aef\u8def\u7531\u7684\u4f18\u7f3a\u70b9"},"3. \u524d\u7aef\u8def\u7531\u7684\u4f18\u7f3a\u70b9"),(0,l.kt)("p",null,"\u524d\u7aef\u8def\u7531\u662f\u524d\u540e\u7aef\u5206\u79bb\u7684\u5f00\u53d1\u6a21\u5f0f\u7684\u4ea7\u7269\uff0c\u5bf9\u6bd4\u670d\u52a1\u7aef\u8def\u7531\uff0c\u524d\u7aef\u8def\u7531\u7684\u5b9e\u73b0\u65b9\u5f0f\u6709\u4ee5\u4e0b\u4f18\u52bf\u548c\u4e0d\u8db3\uff1a"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u4f18\u70b9")),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"\u65e0\u5237\u65b0\u5207\u6362\u5185\u5bb9\uff0c\u7528\u6237\u4f53\u9a8c\u66f4\u4f73\u3002"),(0,l.kt)("li",{parentName:"ol"},"\u51cf\u8f7b\u670d\u52a1\u7aef\u538b\u529b\u3002")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u7f3a\u70b9")),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"\u521d\u6b21\u52a0\u8f7d\u8017\u65f6\u957f\u3002"),(0,l.kt)("li",{parentName:"ol"},"SEO \u6548\u679c\u4e0d\u4f73\u3002")),(0,l.kt)("h2",{id:"\u53c2\u8003\u8d44\u6599"},"\u53c2\u8003\u8d44\u6599"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("a",{parentName:"li",href:"https://developer.mozilla.org/en-US/docs/Web/API/Window/hashchange_event"},"Window: hashchange event"))))}k.isMDXComponent=!0}}]);