SlideShare a Scribd company logo
1 of 18
Client side storage on the
                     modern web



Rajasekharan Vengalil     bit.ly/avranju
Developer Evangelist           @avranju
Microsoft
Agenda
•   Why should you care?   • Security Concerns
•   Cookies                • Summary
•   DOM Storage            • Questions
•   Indexed DB
•   Compatibility
    concerns
Why should you care?
• Enabling disconnected user experiences
  – Intermittent/no connectivity
  – Data caching – shopping carts, user profile
• Complements “Offline Web Applications”
  spec
• HTML based metro style apps on
  Windows 8
COOKIES
Cookies
• Works pretty much
  everywhere
• Storage size limitations
• Transmitted with every
  request
• Poor programming model
DOM STORAGE
DOM Storage
•   Simple persistent key/value store
•   Session storage persists for the session
•   Local storage persists across sessions
•   Scoped by domain
•   Supported even by IE8
•   Can store lots of data
    – 5 MB on FF and Chrome and 10 MB on IE
• But cannot iterate over data
DOM STORAGE

DEMO
INDEXED DB
Indexed DB defined
• Persistent data store in the browser
• Scoped by “origin”
• Each database is versioned

                               example.com


                                Store1   Store2
Indexed DB - Concepts
• Object Store
  – Like tables but only key/value
  – Object store can have 1 or more indexes
  – Keys can be arrays, strings, dates or numbers
  – Values can be objects also
• Transactions
  – Reads/writes done in transaction scope
  – Atomic, durable data access and mutation
Indexed DB – More concepts
• Requests
  – All read/write operations are executed using a
    Request
• Programming model
  – Synchronous
  – Asynchronous
DEMO

SAVE THE DOODLES
What about compatibility?
• Look up polyfills for DOM Storage and Indexed
  DB here:

       bit.ly/polyfills

• Amplify.js – abstracts client side storage
Security concerns
• DOM Storage and Indexed DB – scoped by
  origin
  – Think about cross-directory attacks -
    *.example.com
• Don’t store stuff like credit card numbers
• Be careful when you include 3rd party scripts
• Be careful when storing personally identifiable
  information (PII)
Summary
• We reviewed
  – Options for client side storage today
  – DOM Storage
  – Indexed DB
  – Security concerns to think about
Resources
• IE 10 Dev Guide         • My blog
   – bit.ly/HZUqm5           – bit.ly/avranju
• MDN Documentation       • Twitter
   – mzl.la/HZUz8V           – @avranju
• IE Test Drive Demo      • Email
   – bit.ly/IYidlc           – rajave@microsoft.com
• Indexed DB W3C Spec
   – bit.ly/Jf4MC0
QUESTIONS?

More Related Content

What's hot

What's hot (11)

Visual Design for Content Management Systems
Visual Design for Content Management SystemsVisual Design for Content Management Systems
Visual Design for Content Management Systems
 
Bib frame
Bib frameBib frame
Bib frame
 
Web Design Norms
Web Design NormsWeb Design Norms
Web Design Norms
 
WordPress Architecture For Beginners
WordPress Architecture For Beginners WordPress Architecture For Beginners
WordPress Architecture For Beginners
 
Introducing Joomla! CMS
Introducing Joomla! CMSIntroducing Joomla! CMS
Introducing Joomla! CMS
 
Castro Chapter 2
Castro Chapter 2Castro Chapter 2
Castro Chapter 2
 
Rubedo features list
Rubedo features listRubedo features list
Rubedo features list
 
SharePointArchitecture3
SharePointArchitecture3SharePointArchitecture3
SharePointArchitecture3
 
[@NaukriEngineering] IndexedDB
[@NaukriEngineering] IndexedDB[@NaukriEngineering] IndexedDB
[@NaukriEngineering] IndexedDB
 
CSS Stylesheet Training
CSS Stylesheet TrainingCSS Stylesheet Training
CSS Stylesheet Training
 
Font-End Development Tools
Font-End Development ToolsFont-End Development Tools
Font-End Development Tools
 

Similar to Client side storage on the modern web

Webinar: How MongoDB is Used to Manage Reference Data - May 2014
Webinar: How MongoDB is Used to Manage Reference Data - May 2014Webinar: How MongoDB is Used to Manage Reference Data - May 2014
Webinar: How MongoDB is Used to Manage Reference Data - May 2014MongoDB
 
Redis e Memcached - Daniel Naves - Omnilogic
Redis e Memcached - Daniel Naves - OmnilogicRedis e Memcached - Daniel Naves - Omnilogic
Redis e Memcached - Daniel Naves - OmnilogicFelipe Guimarães
 
Managing storage on Prem and in Cloud
Managing storage on Prem and in CloudManaging storage on Prem and in Cloud
Managing storage on Prem and in CloudHoward Marks
 
Cloudian Webinar - 7 Key Reasons why Object Storage lowers Storage TCO
Cloudian Webinar - 7 Key Reasons why Object Storage lowers Storage TCOCloudian Webinar - 7 Key Reasons why Object Storage lowers Storage TCO
Cloudian Webinar - 7 Key Reasons why Object Storage lowers Storage TCOStorage Switzerland
 
Content is King but Context is Queen ERM & ECM in SharePoint 2013
Content is King but Context is Queen ERM & ECM in SharePoint 2013Content is King but Context is Queen ERM & ECM in SharePoint 2013
Content is King but Context is Queen ERM & ECM in SharePoint 2013C/D/H Technology Consultants
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and meJason Casden
 
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?DATAVERSITY
 
Porting ASP.NET applications to Windows Azure
Porting ASP.NET applications to Windows AzurePorting ASP.NET applications to Windows Azure
Porting ASP.NET applications to Windows AzureGunnar Peipman
 
Design - Building a Foundation for Hybrid Cloud Storage
Design - Building a Foundation for Hybrid Cloud StorageDesign - Building a Foundation for Hybrid Cloud Storage
Design - Building a Foundation for Hybrid Cloud StorageLaurenWendler
 
Ahmedabad- Global Azure bootcamp- Azure Storage Services- Global Azure Bootca...
Ahmedabad- Global Azure bootcamp- Azure Storage Services- Global Azure Bootca...Ahmedabad- Global Azure bootcamp- Azure Storage Services- Global Azure Bootca...
Ahmedabad- Global Azure bootcamp- Azure Storage Services- Global Azure Bootca...Jalpesh Vadgama
 
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case StudyPLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case StudyPROIDEA
 
Cloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation inCloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation inRahulBhole12
 
Webinar: Cloud Storage: The 5 Reasons IT Can Do it Better
Webinar: Cloud Storage: The 5 Reasons IT Can Do it BetterWebinar: Cloud Storage: The 5 Reasons IT Can Do it Better
Webinar: Cloud Storage: The 5 Reasons IT Can Do it BetterStorage Switzerland
 
Encryption in Microsoft 365 - session for CollabDays UK - Bletchley Park
Encryption in Microsoft 365 - session for CollabDays UK - Bletchley ParkEncryption in Microsoft 365 - session for CollabDays UK - Bletchley Park
Encryption in Microsoft 365 - session for CollabDays UK - Bletchley ParkAlbert Hoitingh
 
HTML5 Data Storage
HTML5 Data StorageHTML5 Data Storage
HTML5 Data StorageAllan Huang
 
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...Serdar Basegmez
 
MongoDB SF Python
MongoDB SF PythonMongoDB SF Python
MongoDB SF PythonMike Dirolf
 
Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)Don Demcsak
 

Similar to Client side storage on the modern web (20)

Webinar: How MongoDB is Used to Manage Reference Data - May 2014
Webinar: How MongoDB is Used to Manage Reference Data - May 2014Webinar: How MongoDB is Used to Manage Reference Data - May 2014
Webinar: How MongoDB is Used to Manage Reference Data - May 2014
 
Redis e Memcached - Daniel Naves - Omnilogic
Redis e Memcached - Daniel Naves - OmnilogicRedis e Memcached - Daniel Naves - Omnilogic
Redis e Memcached - Daniel Naves - Omnilogic
 
Managing storage on Prem and in Cloud
Managing storage on Prem and in CloudManaging storage on Prem and in Cloud
Managing storage on Prem and in Cloud
 
Cache is king
Cache is kingCache is king
Cache is king
 
Cloudian Webinar - 7 Key Reasons why Object Storage lowers Storage TCO
Cloudian Webinar - 7 Key Reasons why Object Storage lowers Storage TCOCloudian Webinar - 7 Key Reasons why Object Storage lowers Storage TCO
Cloudian Webinar - 7 Key Reasons why Object Storage lowers Storage TCO
 
Content is King but Context is Queen ERM & ECM in SharePoint 2013
Content is King but Context is Queen ERM & ECM in SharePoint 2013Content is King but Context is Queen ERM & ECM in SharePoint 2013
Content is King but Context is Queen ERM & ECM in SharePoint 2013
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
 
Porting ASP.NET applications to Windows Azure
Porting ASP.NET applications to Windows AzurePorting ASP.NET applications to Windows Azure
Porting ASP.NET applications to Windows Azure
 
Design - Building a Foundation for Hybrid Cloud Storage
Design - Building a Foundation for Hybrid Cloud StorageDesign - Building a Foundation for Hybrid Cloud Storage
Design - Building a Foundation for Hybrid Cloud Storage
 
Ahmedabad- Global Azure bootcamp- Azure Storage Services- Global Azure Bootca...
Ahmedabad- Global Azure bootcamp- Azure Storage Services- Global Azure Bootca...Ahmedabad- Global Azure bootcamp- Azure Storage Services- Global Azure Bootca...
Ahmedabad- Global Azure bootcamp- Azure Storage Services- Global Azure Bootca...
 
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case StudyPLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
 
dmBridge & dmMonocle
dmBridge & dmMonocledmBridge & dmMonocle
dmBridge & dmMonocle
 
Cloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation inCloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation in
 
Webinar: Cloud Storage: The 5 Reasons IT Can Do it Better
Webinar: Cloud Storage: The 5 Reasons IT Can Do it BetterWebinar: Cloud Storage: The 5 Reasons IT Can Do it Better
Webinar: Cloud Storage: The 5 Reasons IT Can Do it Better
 
Encryption in Microsoft 365 - session for CollabDays UK - Bletchley Park
Encryption in Microsoft 365 - session for CollabDays UK - Bletchley ParkEncryption in Microsoft 365 - session for CollabDays UK - Bletchley Park
Encryption in Microsoft 365 - session for CollabDays UK - Bletchley Park
 
HTML5 Data Storage
HTML5 Data StorageHTML5 Data Storage
HTML5 Data Storage
 
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
 
MongoDB SF Python
MongoDB SF PythonMongoDB SF Python
MongoDB SF Python
 
Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Recently uploaded (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

Client side storage on the modern web

  • 1. Client side storage on the modern web Rajasekharan Vengalil bit.ly/avranju Developer Evangelist @avranju Microsoft
  • 2. Agenda • Why should you care? • Security Concerns • Cookies • Summary • DOM Storage • Questions • Indexed DB • Compatibility concerns
  • 3. Why should you care? • Enabling disconnected user experiences – Intermittent/no connectivity – Data caching – shopping carts, user profile • Complements “Offline Web Applications” spec • HTML based metro style apps on Windows 8
  • 5. Cookies • Works pretty much everywhere • Storage size limitations • Transmitted with every request • Poor programming model
  • 7. DOM Storage • Simple persistent key/value store • Session storage persists for the session • Local storage persists across sessions • Scoped by domain • Supported even by IE8 • Can store lots of data – 5 MB on FF and Chrome and 10 MB on IE • But cannot iterate over data
  • 10. Indexed DB defined • Persistent data store in the browser • Scoped by “origin” • Each database is versioned example.com Store1 Store2
  • 11. Indexed DB - Concepts • Object Store – Like tables but only key/value – Object store can have 1 or more indexes – Keys can be arrays, strings, dates or numbers – Values can be objects also • Transactions – Reads/writes done in transaction scope – Atomic, durable data access and mutation
  • 12. Indexed DB – More concepts • Requests – All read/write operations are executed using a Request • Programming model – Synchronous – Asynchronous
  • 14. What about compatibility? • Look up polyfills for DOM Storage and Indexed DB here: bit.ly/polyfills • Amplify.js – abstracts client side storage
  • 15. Security concerns • DOM Storage and Indexed DB – scoped by origin – Think about cross-directory attacks - *.example.com • Don’t store stuff like credit card numbers • Be careful when you include 3rd party scripts • Be careful when storing personally identifiable information (PII)
  • 16. Summary • We reviewed – Options for client side storage today – DOM Storage – Indexed DB – Security concerns to think about
  • 17. Resources • IE 10 Dev Guide • My blog – bit.ly/HZUqm5 – bit.ly/avranju • MDN Documentation • Twitter – mzl.la/HZUz8V – @avranju • IE Test Drive Demo • Email – bit.ly/IYidlc – rajave@microsoft.com • Indexed DB W3C Spec – bit.ly/Jf4MC0