Why does Twitter use a hash and exclamation mark in URLs, and how do they rewrite search URLs?

前端 未结 3 1177
长发绾君心
长发绾君心 2020-12-05 13:13

We understand the hash is for AJAX searches, but the exclamation mark? Anyone know?

Also, the \"action\" attribute for their search form points to \"/search,\" but

3条回答
  •  天涯浪人
    2020-12-05 13:39

    It's become the de facto standard that Google has established to ensure consistency and make ajax urls crawlable.

    See http://code.google.com/web/ajaxcrawling/docs/getting-started.html

    I believe they are using history.pushState. You can do history.back() in the console and it'll lead you back to the page.

提交回复
热议问题