URL 片段标识符是否发送到服务器? [英] Is the URL fragment identifier sent to the server?
问题描述
可能的重复:
PHP 可以读取 URL 的哈希部分吗?
(著名的?)网站 mega.co.nz 在 URL 中使用哈希标记来链接到加密文件;哈希标记之后的 URL 部分包含密码,并且声称加密发生在客户端.使用 javascript 进行客户端加密当然是可行的,但是……不是将 URL 发送到服务器,从而将密码泄露给服务器本身吗?
The (famous?) web site mega.co.nz uses a hash mark in URLs to link to encrypted files; the portion of the URL after the hash mark contains a password, and encryption is claimed to happen on the client side. It is certainly feasible to use javascript for client-side encryption but … isn't the URL sent to the server, thus revealing the password to the server itself?
网址看起来像
https://example.com/#!encryptedfilename_password
推荐答案
片段标识符不会发送到服务器.浏览器使用哈希片段链接到同一页面中的元素.
Fragment identifiers are not sent to the server. The hash fragment is used by the browser to link to elements within the same page.
这篇关于URL 片段标识符是否发送到服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!