Up until now, we've worked with storing text values in
LocalStorage. I hope you agree that it is an easy process to perform, and that used with care, we can achieve some great results. I mentioned though, at the end of the last recipe, that we could really turn the tables, and start to store images in
LocalStorage. We'll see how to achieve this, using a technique developed by Rob Nyman, a Technical Evangelist at Mozilla.
For this recipe, we will need a suitable image to store in
LocalStorage. There is no hard and fast rule on size, but we should bear in mind that in reality
LocalStorage can't hold more than 5 to 10 MB (depending on the browser), so it is wise to choose a sensible ...