我希望页面上有绿色的挂锁表示它是安全的。但是,根据https://www.whynopadlock.com/,我需要更改我的mailto:表单。
这是我当前的HTML代码:
<form action="mailto:myemail@gmail.com" enctype="text/plain" method="post">
<input type="text" name="name" placeholder="Name" class="name" required />
<input type="email" name="emailaddress" placeholder="Email" class="email" type="email" required />
<textarea type="text" rows="4" name="Message" placeholder="Message" class="message" required></textarea>
<button class="res" type="reset" value="Reset">Reset</button>
<input name="submit" class="butn" type="submit" value="»" />
</form>
如何更改此代码以使我的网站更安全?
答案 0 :(得分:3)
但是,根据https://www.whynopadlock.com/,我需要更改mailto:表单。
在您所引用的网站上,我没有看到有关mailto:
链接的任何声明。
而且mailto:
链接根本没有HTTPS,因为编写邮件是由特定于用户的应用程序完成的,这可以通过使用SMTP进行邮件传递的本地邮件客户端来完成(根据设置而定,是否使用TLS)客户端),也可以通过某些基于Web的邮件应用程序来完成,该应用程序可能会或可能不会使用HTTPS。
除了使用邮件传递来转发填充到Web表单中的数据外,这可能不是一个好主意,因为它要求用户已经设置了一些邮件应用程序-即无法与Web亭,互联网一起使用咖啡馆等。通常的方法是在您的站点上将一些后端作为表单目标,而这次您可以使用https://
。