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

KEY
CE-9506_Session02
PDF
Forms as Structured Content
ODP
Web design using html
PPTX
Multi-content Containers in dotCMS 3.0
PPTX
Web development using html and wordpress
PPTX
Web Pages
PPTX
Varnish & Magento TechTalk @Lyracons
PPTX
World Wide Web
CE-9506_Session02
Forms as Structured Content
Web design using html
Multi-content Containers in dotCMS 3.0
Web development using html and wordpress
Web Pages
Varnish & Magento TechTalk @Lyracons
World Wide Web

What's hot (11)

PDF
Visual Design for Content Management Systems
PPT
Bib frame
PPTX
Web Design Norms
PPTX
WordPress Architecture For Beginners
PPTX
Introducing Joomla! CMS
PPTX
Castro Chapter 2
PDF
Rubedo features list
PPTX
SharePointArchitecture3
PDF
[@NaukriEngineering] IndexedDB
PPTX
CSS Stylesheet Training
PPTX
Font-End Development Tools
Visual Design for Content Management Systems
Bib frame
Web Design Norms
WordPress Architecture For Beginners
Introducing Joomla! CMS
Castro Chapter 2
Rubedo features list
SharePointArchitecture3
[@NaukriEngineering] IndexedDB
CSS Stylesheet Training
Font-End Development Tools
Ad

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

PPTX
Webinar: How MongoDB is Used to Manage Reference Data - May 2014
PPT
Redis e Memcached - Daniel Naves - Omnilogic
PPTX
Managing storage on Prem and in Cloud
PPTX
Cache is king
PPTX
Gr12 2_4 InternetServicesTechnologies.pptx
PPTX
Cloudian Webinar - 7 Key Reasons why Object Storage lowers Storage TCO
PDF
Content is King but Context is Queen ERM & ECM in SharePoint 2013
PPTX
In-browser storage and me
PPTX
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
PPTX
Porting ASP.NET applications to Windows Azure
PDF
Design - Building a Foundation for Hybrid Cloud Storage
PPTX
Ahmedabad- Global Azure bootcamp- Azure Storage Services- Global Azure Bootca...
PDF
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
PPTX
dmBridge & dmMonocle
PPTX
Cloud computing UNIT 2.1 presentation in
PPTX
Webinar: Cloud Storage: The 5 Reasons IT Can Do it Better
PPTX
Encryption in Microsoft 365 - session for CollabDays UK - Bletchley Park
PPT
HTML5 Data Storage
PDF
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
KEY
MongoDB SF Python
Webinar: How MongoDB is Used to Manage Reference Data - May 2014
Redis e Memcached - Daniel Naves - Omnilogic
Managing storage on Prem and in Cloud
Cache is king
Gr12 2_4 InternetServicesTechnologies.pptx
Cloudian Webinar - 7 Key Reasons why Object Storage lowers Storage TCO
Content is King but Context is Queen ERM & ECM in SharePoint 2013
In-browser storage and me
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
Porting ASP.NET applications to Windows Azure
Design - Building a Foundation for Hybrid Cloud Storage
Ahmedabad- Global Azure bootcamp- Azure Storage Services- Global Azure Bootca...
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
dmBridge & dmMonocle
Cloud computing UNIT 2.1 presentation in
Webinar: Cloud Storage: The 5 Reasons IT Can Do it Better
Encryption in Microsoft 365 - session for CollabDays UK - Bletchley Park
HTML5 Data Storage
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
MongoDB SF Python
Ad

Recently uploaded (20)

PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PPTX
Configure Apache Mutual Authentication
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
Enhancing plagiarism detection using data pre-processing and machine learning...
Rapid Prototyping: A lecture on prototyping techniques for interface design
Comparative analysis of machine learning models for fake news detection in so...
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
sbt 2.0: go big (Scala Days 2025 edition)
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
sustainability-14-14877-v2.pddhzftheheeeee
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Co-training pseudo-labeling for text classification with support vector machi...
Configure Apache Mutual Authentication
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
giants, standing on the shoulders of - by Daniel Stenberg
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
Convolutional neural network based encoder-decoder for efficient real-time ob...
Data Virtualization in Action: Scaling APIs and Apps with FME

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 – [email protected] • Indexed DB W3C Spec – bit.ly/Jf4MC0