O'Reilly logo

Instant typeahead.js by Toby Osbourn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Supporting LocalStorage (Should know)

In our last recipe we discussed how to best cache our lookups in order to save our resources and make a better experience for our users. In this recipe we are going to look at increasing the amount of users we can make happy with this caching.

Getting ready

All caching that occurs in typeahead.js is done by using LocalStorage.

LocalStorage is well supported by most modern browsers, but there are still some older browsers that do not support it. You will often find these browsers in corporate environments where users cannot update software themselves and the IT department needs to stick with older software for whatever reason.

We shouldn't punish our users for not being able to use modern browsers, especially when ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required