CONTINUE TO SITE »
or wait 15 seconds

Blog

Dramatically increase a kiosk application's performance with local caching, pt. 2

In the second part of this two-part series I'll cover a couple of cool options for persistent local storage in the Web browser. In part one I covered the benefits of caching data locally on a kiosk, the sort of data you'll want to cache and some helpful tips for caching.

January 28, 2015 by Andrew Savala — CEO, KioskSimple

If your kiosk regularly synchronizes data with a remote server, then you may have the opportunity to dramatically improve your kiosk's performance by making use of its local storage. By caching data locally a kiosk can respond more quickly to user input, reducing the amount of time a kiosk spends waiting on a response from the server.

In the second part of this two-part series I'll cover a couple of cool options for persistent local storage in the Web browser. In part one I covered the benefits of caching data locally on a kiosk, the sort of data you'll want to cache and some helpful tips for caching.

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 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:

https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage

http://en.wikipedia.org/wiki/Web_storage

http://www.w3.org/TR/webstorage/

IndexedDB

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 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:

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 a kiosk application as a native Windows application vs. a Web application you'll want to check out these helpful articles:

About Andrew Savala

Andrew Savala is the COO of BIxby, with a background in designing and deploying payment kiosk systems. He offers consulting services to companies looking to develop their payment kiosks.

Connect with Andrew:

Related Media




©2025 Networld Media Group, LLC. All rights reserved.
b'S2-NEW'