【发布时间】:2013-01-29 03:42:16
【问题描述】:
我想制作一个单页网站,它使用 history.pushstate 来更改 url。 我可以让我的网站只有一个 html 文件,即 404 页面。这样无论人们输入什么网址,他们都会到达该页面。
我的问题是:以这种方式滥用 404 页面有缺点吗?
谷歌在乎吗? 有浏览器怪癖吗?
【问题讨论】:
-
一个好的经验法则
Until and unless you dont have any other option, dont use things in a way they are not supposed to work。遵守约定。
标签: javascript ajax http http-status-code-404