Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Storing data is core functionality of JavaScript. It doesn’t make things swoosh around the page, slide, fade in/out, or draw the user’s eye. But properly storing your data will make it well organized and easy to access later in your application, which is one of those magic pieces about creating a great user experience that the user is completely ignorant about (in a good way—they don’t notice it). Quick and easy access to data, brilliant!
In this chapter, you learn the different methods of storing data within a JavaScript model. Some methods are internal to your own personal scripting file and some are consumed externally. Externally generated data can be produced by a database local to your application or an external API service (we’ll get into APIs). In some form or another, you will be storing and caching data on every project, Knowing not only your options but the proper times to use them can be very valuable when you’re trying to create a codebase that performs well and is reasonably easy to maintain (a constant balancing act for all front-end code).