禁用Chrome自動填充 - Disabling Chrome Autofill

問題:

This post is a Community Wiki . 這篇文章是社區維基 Edit existing answers to improve this post. 編輯現有答案以改善此職位。 It is not currently accepting new answers. 它當前不接受新的答案。 Learn more . 瞭解更多

I have been running into issues with the chrome autofill behavior on several forms. 我一直在遇到幾種形式的Chrome自動填充行爲問題。 chrome

The fields in the form all have very common and accurate names, such as "email", "name", or "password", and they also have autocomplete="off" set. 表單中的全部字段都有很是通用且準確的名稱,例如「電子郵件」,「名稱」或「密碼」,而且還設置了autocomplete="off" 後端

The autocomplete flag has successfully disabled the autocomplete behavior, where a dropdown of values appear as you start typing, but has not changed the values that Chrome auto-populates the fields as. 自動完成標記已成功禁用了自動完成行爲,該行爲會在您開始鍵入時出現一個下拉列表,但並未更改Chrome自動將字段填充爲的值。 app

This behavior would be ok except that chrome is filling the inputs incorrectly, for example filling the phone input with an email address. 這種行爲是能夠的,除了chrome沒法正確填寫輸入內容(例如,用電子郵件地址填充電話輸入內容)。 Customers have complained about this, so it's verified to be happening in multiple cases, and not as some some sort of result to something that I've done locally on my machine. 客戶對此有所抱怨,所以已證明它是在多種狀況下發生的,而不是我在計算機上本地完成的操做的某種結果。 post

The only current solution I can think of is to dynamically generate custom input names and then extract the values on the backend, but this seems like a pretty hacky way around this issue. 我能想到的惟一當前解決方案是動態生成自定義輸入名稱,而後在後端提取值,但這彷佛是解決此問題的一種很怪異的方法。 Are there any tags or quirks that change the autofill behavior that could be used to fix this? 是否有任何可更改自動填充行爲的標記或怪癖可用來解決此問題? ui


解決方案:

參考一: https://stackoom.com/question/142Et/禁用Chrome自動填充
參考二: https://oldbug.net/q/142Et/Disabling-Chrome-Autofill
相關文章
相關標籤/搜索