差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

Both sides previous revision 前次修改
下次修改
前次修改
java:web:browserautocomplete [2015/12/15 14:05]
tony [How to?]
java:web:browserautocomplete [2023/06/25 09:48] (目前版本)
行 21: 行 21:
 <input type="​password"​ autocomplete="​off"​ name="​password"/>​ <input type="​password"​ autocomplete="​off"​ name="​password"/>​
 </​code>​ </​code>​
 +經過測試,推測這方法是要讓自動完成輸入到隱藏欄位又或者是打亂瀏覽器自動完成的layout偵測。(參考2有一個透過javascript的解法,但我認為它是來亂的)\\
 +\\
 +此外,我想到如果這是由瀏覽器自行填入的,那是不是代表著:​ HTML中藏著密碼?​ 因此透過Firefox的開發者工具列發現的確如此:​\\
 +{{:​java:​web:​passwd_hidden_input_security_issue.png|}}\\
 +\\
 +因此我多設定value去避免此問題:​
 +<code html>
 +<input type="​password"​ style="​display:​ none" value="​ "/>
 +</​code>​
 +====== 後記 ======
 +  * 2016-04-11 發現chrome上無效,但可以透過autocomplete="​new-password"​解決。
 +  * 新解法: [[java:​web:​wicket:​dont_autocomplete|link]] ​
 ====== Reference ====== ====== Reference ======
   * [[https://​developer.mozilla.org/​en-US/​docs/​Web/​Security/​Securing_your_site/​Turning_off_form_autocompletion|How to Turn Off Form Autocompletion?​]]   * [[https://​developer.mozilla.org/​en-US/​docs/​Web/​Security/​Securing_your_site/​Turning_off_form_autocompletion|How to Turn Off Form Autocompletion?​]]
   * [[http://​stackoverflow.com/​questions/​17781077/​autocomplete-off-is-not-working-on-firefox|autocomplete = '​off'​ is not working on firefox]]   * [[http://​stackoverflow.com/​questions/​17781077/​autocomplete-off-is-not-working-on-firefox|autocomplete = '​off'​ is not working on firefox]]
 +  * [[http://​stackoverflow.com/​questions/​15738259/​disabling-chrome-autofill|disabling-chrome-autofill]]
  
 ====== ​ ====== ====== ​ ======