If your kiosk regularly synchronizes data with a remote server then you may have the opportunity to dramatically improve your kiosks performance by making use of your kiosks local storage. By caching data locally it allows your kiosk to respond more quickly to user input by reducing the amount of time your kiosk spends waiting on a response from the server.
In the second part of this 2-part series I’ll cover a couple cool options for persistent local storage in the web browser. In part one I covered the benefits of caching data locally on your kiosk, the sort of data you’ll want to cache and some helpful tips for caching.
The three main advantages of caching data locally on your kiosk
- Increases the responsiveness of your kiosk
- Reduces the load on your server
- Lowers bandwidth requirements
Local storage options for modern web application
Persistent local storage is an area where native applications have traditionally had the advantage over web applications. Native applications are able to take advantage of the registry and local file system for storage where web applications have been relegated to using cookies for persistent storage which are limited to about 4K in capacity.
Continue reading to learn about a couple cool local storage options which allow web applications to persistently store data inside your kiosk’s web browser. By utilizing persistent storage, web applications can cache large amounts of data locally for greater performance.
Web Storage (aka DOM Storage and Local Storage)
Web storage supports storing persistent data similar to cookies with a significantly increased storage capacity typically around 5-10 megs depending on the browser. Unlike cookies, which can be accessed by client and server side code, web storage is accessible purely by client side scripting.
Web Storage allows for key/value pairs to be securely stored and retrieved and can be manually transmitted to the server on request, giving your web application granular control over when data is sent to the server. Cookies on the other hand are transmitted to the server on every request, thereby needlessly transmitting data repeatedly between your kiosk and server.
Here is a live demonstration of web storage. Make a few moves, then close the browser tab, then re-open it. If your browser supports Web Storage the demonstration page should “magically” remember your exact position within the game, including the number of moves you’ve made, the position of each of the pieces on the board, and even whether a particular piece is selected.
Additional references for web storage:
IndexedDB is an API built on a transactional database model which allows for client-side storage of larger amounts of structured data which can be retrieved through key-value pairs. High performance querying is also made possible through the use of indexes. IndexedDB shares many attributes in common with a SQL database.
IndexedDB is an alternative to Web SQL Database, which the W3C deprecated on November 18, 2010. While both IndexedDB and Web SQL are solutions for storage, they do not offer the same functionalities. Web SQL Database is a relational database with rows and columns, whereas IndexedDB is an object-oriented indexed table system.
Additional references for IndexedDB:
By making use of your kiosk’s local storage you can increase performance at the kiosk, reduce the processing load on your server and lower your bandwidth requirements. For more information on web browser based persistent storage and a history of when these technologies were developed checkout The Past, Present & Future of Local Storage for Web Applications.
Also, if you’re debating between developing your kiosk application as a native Windows application vs. a web application you’ll want to check out these helpful articles:
- 6 Reasons to Develop Your Kiosk Application as a Native Windows Application
- 5 Reasons to Develop Your Kiosk Application as a Website
Subscribe to our blog updates today to keep up to date on our latest content.
Latest posts by Andrew Savala (see all)
- How to Plan Your Payment Kiosk Workflow - May 4, 2019
- Selecting Kiosk Payment Devices, Don’t Paint Yourself into A Corner - April 25, 2019
- Get to Market Faster with An MVP Kiosk - April 20, 2019