1 / 8

HTML 5 STORAGE

HTML 5 STORAGE. CLINT SIDE STORAGE. SAFA SADEQ. WHAT IS CLIENT SIDE STORAGE ???. It’s small storage contains the data of any website in the client's computer . It’s save it in ‘key’ = ‘value’ method . It’s useful in client/server side web application . Most popular CSS is the COOKIE .

pakuna
Download Presentation

HTML 5 STORAGE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HTML 5 STORAGE CLINT SIDE STORAGE SAFA SADEQ

  2. WHAT IS CLIENT SIDE STORAGE ??? • It’s small storage contains the data of any website in the client's computer . • It’s save it in ‘key’ = ‘value’ method . • It’s useful in client/server side web application . • Most popular CSS is the COOKIE . • COOKIE is save small amounts of data on the client computer as array of key /value . • But it’s have potentially disadvantages .

  3. three potentially dealbreaking downsides on cookie • Cookies are included with every HTTP request, thereby slowing down your web application by needlessly transmitting the same data over and over . • Cookies are included with every HTTP request, thereby sending data unencrypted over the internet . • Cookies are limited to about 4 KB of data — enough to slow down your application .

  4. What we really want ? • a lot of storage space . • on the client. • that persists beyond a page refresh . • and isn’t transmitted to the server . When I can found that ?!! Html5 Produce local storage that have all what we need .

  5. So what is HTML5 storage ??? • Simply put, it’s a way for web pages to store named key/value pairs locally, within the client web browser. Like cookies, this data persists even after you navigate away from the web site, close your browser tab, exit your browser, or what have you. Unlike cookies, this data is never transmitted to the remote web server (unless you go out of your way to send it manually) • From your JavaScript code, you’ll access HTML5 Storage through the localStorage object on the global window object. • Storage space of around 5MB depending upon user agent

  6. Who I know if my browser support that? • All these browsers support HTML5 storage : IE 8.0 , FIREFOX 3.5 ,SAFARI 4.0 ,CHROME 4.0 , OPERA 10.5 and above .

  7. Important thing !!!! You can access to this storage from JavaScript code only . Through the two objects: localStorage & sessionStorage

  8. sessionStoragevslocalStorage • When I using localStorage in previous example , I save the counter value when I close my browser window , and in any time I return to this page the counter is increment . • But when I use sessionStorage , I lose the counter value when I close my browser window , and that is useful in many client web application .

More Related