You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/docs/zh/guide/essentials/history-mode.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,11 +24,9 @@ const router = createRouter({
24
24
25
25
它在内部传递的实际 URL 之前使用了一个哈希字符(`#`)。由于这部分 URL 从未被发送到服务器,所以它不需要在服务器层面上进行任何特殊处理。不过,**它在 SEO 中确实有不好的影响**。如果你担心这个问题,可以使用 HTML5 模式。
26
26
27
-
<!-- TODO: translation -->
27
+
## Memory 模式
28
28
29
-
## Memory mode
30
-
31
-
The memory history mode doesn't assume a browser environment and therefore doesn't interact with the URL **nor automatically triggers the initial navigation**. This makes it perfect for Node environment and SSR. It is created with `createMemoryHistory()` and **requires you to push the initial navigation** after calling `app.use(router)`.
While it's not recommended, you can use this mode inside Browser applications but note **there will be no history**, meaning you won't be able to go _back_ or _forward_.
0 commit comments