autocomplete nói cho browser biết field này chứa loại dữ liệu gì, để gợi ý đúng thứ đã lưu.
html
<input name="name" autocomplete="name">
<input name="email" autocomplete="email" type="email">
<input name="phone" autocomplete="tel" type="tel">
<input name="addr" autocomplete="address-line1">
<!-- đăng nhập -->
<input name="user" autocomplete="username">
<input name="pass" type="password" autocomplete="current-password">
<!-- đăng ký / đổi mật khẩu: gợi ý mật khẩu mạnh -->
<input name="pass" type="password" autocomplete="new-password">
<!-- OTP: iOS/Android tự điền từ SMS -->
<input name="otp" autocomplete="one-time-code" inputmode="numeric">Đặt được ở cấp <form> (áp cho cả form) hoặc từng input. autocomplete="off" chỉ nên dùng cho field thật sự dùng một lần.
Lưu ý: đừng dùng cùng autocomplete="current-password" cho ô "mật khẩu mới" — trình quản lý mật khẩu điền lại mật khẩu cũ, và không gợi ý sinh mật khẩu mới. Phân biệt current-password / new-password là chi tiết hay được hỏi khi phỏng vấn về form.
Chốt: đây là tối ưu chuyển đổi rẻ nhất trên mobile — điền tay địa chỉ trên điện thoại là chỗ người dùng bỏ cuộc nhiều nhất.