Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For search query input values, if we’re okay with having suggestions based only on the user’s previous searches and not those of all users querying that particular DDF instance, then we would recommend storing the user’s queries in the browser via localStorage. The stored queries can easily be used to power a <datalist> for the browser’s autocomplete functionality, or to act as a backing data source for JQuery UI’s autocomplete or another JavaScript autocomplete widget. This solution has the advantage of requiring only client-side code changes (and small ones at that). Additionally, it allows the suggestion data to persist between DDF restarts.

...