Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 178081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:10:07+00:00 2026-05-11T14:10:07+00:00

I am using jQuery.autocomplete(1.02) on my search box and I want exact string and

  • 0

I am using jQuery.autocomplete(1.02) on my search box and I want exact string and substring matching. I don’t care (yet!) about the database load, I’m happy for it to fire off a query every keystroke and bypass the caching entirely – I just don’t want anything missed.

To this end I have tried setting cacheLength=1, the minimum permitted, but the autocomplete function refuses to fire off a GET request for each key up.

searchbox          GET_request     'a'       ->    http://localhost/service_search_request?q=a    'ar'      ->    http://localhost/service_search_request?q=ar    'ars'     ->    http://localhost/service_search_request?q=ars 

Instead, it sends the first and the third and misses the second, giving me the wrong results for ‘ar’ :-/ I’ve cleared my cache and sessions but it looks like some sort of caching is still going on. AFAIK I have no proxying going on and I’m shift-refreshing each time. It looks likely then that this behavior is from jQuery.autocomplete itself.

So my questions are…

A) Does this seem likely? i.e. is it a feature, or maybe a bug?

B) If so is there a clean way around it?…

C) If not, what autocomplete would you use instead?

Naturally D) No you’re just using it incorrectly you douche! is always a possibility, and indeed the one I’d prefer having spent time going down this road – assuming it comes with a link to the docs I’ve failed to find / read!

Cheers,

Roger 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:10:08+00:00Added an answer on May 11, 2026 at 2:10 pm

    I wonder why cacheLength doesn’t work, but had trouble with autocomplete too. IMHO, there are errors in it. However, in the list of options, there is a matchSubset you could set to false.

    EDIT: somewhere around line 335 is a function called ‘request’. You could add some debug messages to it, to see what happens: (note: you need firebug installed or ‘console’ will be unknown)

    function request(term, success, failure) {      console.debug('ac request...');      if (!options.matchCase)         term = term.toLowerCase();      var data = cache.load(term);      console.debug('ac request 1, loaded data from cache: ' + data + ' term: ' + term);      // recieve the cached data     if (data && data.length) {         success(term, data);     // if an AJAX url has been supplied, try loading the data now     } else if( (typeof options.url == 'string') && (options.url.length > 0) ){          console.debug('ac request 2, data is not in the cache, request it'); 

    ‘flushCache’ can easily be used in the function you can attach / set as options. I used this, to clear the Cache, if there could be more data in the backend:

    formatItem: function (data,i,n,value){     if(i === (this.max -1)){         console.debug('flushCache');         jQuery(this).flushCache();     }      return data[1] + ' (' + data[0] + ')'; } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using jQuery UI Autocomplete with a categorized search result and I want to
I am using jQuery Autocomplete to search a local database of cities. Here is
I'm using jQuery AutoComplete, and I have an auto-complete search box to search for
I'm using 'rails3-jquery-autocomplete' gem, but it doesn't have multi column search, but there is
i will like to populate a Jquery autocomplete search with database items... rather than
I'm using the jQuery UI's autocomplete function on a search on my site. When
I have an input box for which I am using the Jquery autocomplete function.
I'm using jQuery autocomplete for a search field. When the autocomplete source returns a
Im currently using This JQuery as a search box on my website. The Javascript
I am using jQuery UI Autocomplete to build a search interface. I have defined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.