How to remove default browsers behavior on search input?
When a user start typing to an HTML
input, there might be a legacy auto-completion feature displayed. In this tutorial we’ll see how to disable this behavior.
A classic the search html input definition looks like:
<input type="text" id="search" />
Updating input markup
There are four input attributes that we can define to cancel default browsers’ behavior:
The updated input should look like this:
<input type="text" id="search" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" />
More information on input properties
For more information check out the reference of each of those attributes:
Continue building your Algolia knowledge with these tutorials:
Did you find this page helpful?
We're always looking for advice to help improve our documentation!
Please let us know what's working (or what's not!).
We're constantly iterating thanks to the feedback we receive.