11.07.2015 Views

Client-Side Storage in Web Applications

Client-Side Storage in Web Applications

Client-Side Storage in Web Applications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.1 HTTP CookieHTTP cookie 1 [3], <strong>in</strong>vented by Netscape <strong>in</strong> 1994 and later standardized by IETF, isa popular mechanism that lets web servers and web clients to ma<strong>in</strong>ta<strong>in</strong> and manage astateful session between each other over the mostly stateless HTTP protocol. Cookiesallow a small piece of simple key-value pair data (4 kB per cookie, 50 cookies perorig<strong>in</strong>) to be stored <strong>in</strong> a user’s web client (browser). Cookie data can be set to lastover a s<strong>in</strong>gle session (session cookie) or multiple sessions (persistent cookie). Typically,web applications use them for session management, authentication purposes,stor<strong>in</strong>g user preferences, and user track<strong>in</strong>g. All major browsers have native supportfor cookies.Although cookies provide a simple and well-supported stor<strong>in</strong>g mechanism, theysuffer from several problems. First, each cookie is sent back and forth with everyHTTP request (via HTTP headers), which adds a lot of unnecessary overhead. Second,their storage size is way too small for modern web applications. Third, the sameweb application us<strong>in</strong>g cookies cannot be run <strong>in</strong> multiple web browser tabs simultaneously.F<strong>in</strong>ally, the API is a bit clunky. [15, 16]2.2 Flash CookieIn 2002, Adobe <strong>in</strong>troduced a feature called Flash cookie (Local Shared Object) [2],which is an Adobe Flash Player based mechanism to store and manage data on auser’s computer. Flash cookies are exactly like HTTP cookies, except that they canstore more complex data types than just pla<strong>in</strong> str<strong>in</strong>gs and offer more storage space(defaults to 100 kB per orig<strong>in</strong>). The easiest way to access Flash cookies fromJavaScript is via the ExternalInterface object, which was <strong>in</strong>troduced <strong>in</strong> Adobe Flash 8<strong>in</strong> 2006.In order to use Flash cookies, Adobe Flash Player 6+ plug-<strong>in</strong> needs to be <strong>in</strong>stalledto a web browser. Mobile browsers, however, are gradually mov<strong>in</strong>g away from Flash,and therefore the use of Flash cookies is no longer an option on mobile devices [1].2.3 (Google) GearsIn 2007, Google launched Gears 2 [7] which offers web applications, among otherfeatures, the ability to store and manage persistent data locally on web clients, andaccess to it through the use of a JavaScript API and a variant of SQL. Gears comeswith an embedded client-side relational database based on SQLite 3 . Compared toprevious solutions, Gears’ ma<strong>in</strong> advantage is its unlimited storage size.In March 2011, Gears announced that there will be no new Gears releases <strong>in</strong> the futureand newer browser versions will not be supported [8]. The decision was based onshift<strong>in</strong>g the focus from Gears to HTML5, i.e., to help the W3C <strong>in</strong> def<strong>in</strong><strong>in</strong>g and stan-1 Also referred to as a cookie, <strong>Web</strong> cookie, and browser cookie.2 Formerly Google Gears3 SQLite, http://www.sqlite.org/3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!