Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Data Storage</strong><br> You should store this information in a database. Create a table or two to hold this type of information per user per field.</p> <p><strong>Client-side Query</strong><br> You can query the database from the client side (via AJAX) when the user starts to type in the text field. If you do this, it is considered best practice to wait until there are at least 3 (ish) characters in the field before querying the server for suggestions. This reduces the number of requests slightly and the traffic between the client and server.</p> <p>I use this method for fields where there is a large number of possible auto-suggest hits.</p> <p><em>Caching</em><br> If you use this method, you can optimize the process by caching the response in certain situations.</p> <p>Assuming that the query is fired off only after 3 characters are in the text field, you can then cache the entire result. Any further characters added to the text box will not increase the number of results returned. So, you can just continue to filter down the cached results. If, however, the user deletes a character, you can refresh the cache to make sure that you have the most appropriate auto-suggest hits available.</p> <p><strong>Server-side Preloading</strong><br> On the server-side, gather all of this data and send it along with the page request. (You can push it down as a javascript array somewhere that can be referenced in the <code>onchange</code> event of the text field. This way, you don't have to make any AJAX calls.</p> <p>This appears to be better for fields where there will not be a large number of possible auto-suggest hits.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload