友好 URL 在 HTTPS 下是否安全?
我知道带参数的查询在 HTTPS 下受到保护,例如 https://encrypted.google.com/search ?q=stackoverflow
但是像 twitter 这样的友好 URL 又如何呢,https://twitter.com /#!/search/stackoverflow ,这是否安全且不会被任何人拦截?
问候,
I know that query with parameters are secured under HTTPS, e.g. https://encrypted.google.com/search?q=stackoverflow
But what about the friendly URLs like twitter, https://twitter.com/#!/search/stackoverflow , is this secure and can't be intercepted by anyone?
Regards,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是;通过 HTTPS 传输时,整个 URL 都会被加密,无论其内容是什么;而且,无论请求是正常的还是AJAX的,都没有关系。
(HTTP 规范中没有任何类似“友好 URL”或“敌意 URL”或“中性 URL”的内容,只有 URL。协议本身完全不知道服务器对 URL 进行的处理 - “友好 URL”只是一种方便的说法是“对于人类来说有点容易掌握的 URL”;这与底层协议无关,客户端向服务器发送 URL 请求。服务器返回响应。只要 URL 格式有效,其内容就无关紧要)
(旁白:
#
(片段)之后的部分是客户端的,因此不会传输。完全在请求中;无论处理发生在客户端,可能是使用 AJAX)Yes; the entire URL is encrypted when transmitted over HTTPS, no matter what its contents are; also, it doesn't matter if the request is normal or AJAX.
(there is nothing like "friendly URLs" or "hostile URLs" or "neutral URLs" anywhere in the HTTP spec, just URLs. The protocol itself is completely oblivious to what processing the server does with the URL - "friendly URLs" is just a convenient way of saying "URLs that are somewhat easy to grasp for humans"; this has no bearing on the underlying protocols. For HTTP, the client sends a request for an URL to a server, and the server gives back a response. As long as the URL is in a valid format, its content is immaterial. )
(aside: the part after the
#
(fragment) is client-side and as such not transmitted in requests at all; whatever processing is done on that happens on the client side, possibly with AJAX)