我遇到过许多警告不要使用链接来提供注销功能的文章。他们都建议使用表单和按钮进行注销。
当我使用 firebug 检查 gmail 的注销元素的 html 时,我发现它是一个链接:
<a target="_top" role="button" id="gb_71" onclick="gbar.logger.il(9,{l:'o'})" href="?logout&hl=en" class="gbqfbb">Sign out</a>
有类似的href
东西
https://mail.google.com/mail/ca/?logout&hl=en
他们使用链接是因为href
https 吗?这种用法有多安全?