Autosuggest and data base hits
I am using jQuery autosuggest in place of a drop down in开发者_如何学运维 ASP.NET MVC project.
My problem is when user type in textbox every time database request will generate, its very costly operation.
Is there any better solution?
Caching. Add caching to the service and/or use caching options of your autosuggest jQuery code.
For caching on the service of course you do it using the word parameter as caching parameter.
Also, it might help a bit to make your autosuggest triggered on entries more than 2-3 characters (depending on your kinds of inputs).
精彩评论