Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Web Storage
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Sebastiano Armeli
March 09, 2011
Programming
170
0
Share
Web Storage
Talk given in March 2011
Sebastiano Armeli
March 09, 2011
More Decks by Sebastiano Armeli
See All by Sebastiano Armeli
Cultivate Excellence In Engineering Teams through Continuous Software Engineering
sebarmeli
1
210
From Strategy Definition to Execution with OKRs and Roadmap
sebarmeli
0
220
From Mission to Strategy: going over OKRs and Roadmap
sebarmeli
0
310
Managing a software engineering team
sebarmeli
1
650
Enforcing coding standards in a JS project
sebarmeli
0
610
Enforcing Coding Standards
sebarmeli
1
130
ES6: The future is now
sebarmeli
2
510
EcmaScript 6 - the future is here
sebarmeli
5
7.5k
Dependency management and Package management in JavaScript
sebarmeli
0
780
Other Decks in Programming
See All in Programming
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
290
Agentic UI in the Frontend: Architectures with Open Standards @JAX 2026 in Mainz
manfredsteyer
PRO
0
120
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
510
cloudnative conference 2026 flyle
azihsoyn
0
180
GoogleCloudとterraform完全に理解した
terisuke
1
200
t *testing.T は どこからやってくるの?
otakakot
1
940
Hive Metastoreを通して学ぶIceberg REST Catalog ― 仕様から実装まで
okumin
0
140
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
3
950
Are We Really Coding 10× Faster with AI?
kohzas
0
180
Agent Skills を社内で育てる仕組み作り
jackchuka
1
2k
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
150
AI Agent と正しく分析するための環境作り
yoshyum
2
510
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
210
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
120
How STYLIGHT went responsive
nonsquared
100
6.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
300
Writing Fast Ruby
sferik
630
63k
The Spectacular Lies of Maps
axbom
PRO
1
750
Google's AI Overviews - The New Search
badams
0
1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
KATA
mclloyd
PRO
35
15k
Tell your own story through comics
letsgokoyo
1
920
Transcript
Web Storage Sebastiano Armeli-Battana
[email protected]
@sebarmeli Sunday, 20 February 2011
Remote Data Storage Sunday, 20 February 2011
Why Web Storage? • Performance • Speed • Reduced load
on the servers • Offline applications • Transaction - HTTP stateless Sunday, 20 February 2011
History of Client-side Storage •HTTP Cookie • userData Behaviour in
IE 5.5 • Local Shared Objects in Adobe Flash • Google Gears Sunday, 20 February 2011
Web Storage • by WHATWG / W3C • HTML5? Actually
not... • 2 Storage Areas : • localStorage • sessionStorage • globalStorage HTML Sunday, 20 February 2011
Storage API interface Storage { readonly attribute unsigned long length;
DOMString key(in unsigned long index); getter any getItem(in DOMString key); setter creator void setItem(in DOMString key, in any value); deleter void removeItem(in DOMString key); void clear(); }; Sunday, 20 February 2011
localStorage • localStorage.setItem(“key1”, “value1”); localStorage.setItem(“key2”, “value2”); • localStorage.getItem(“key1”); // “value1”
• localStorage.length; //2 • localStorage.removeItem(“key1”); • localStorage.length; // 1 • localStorage.clear(); • localStorage.length; // 0 Sunday, 20 February 2011
sessionStorage • sessionStorage.setItem(“key1”, “value1”); sessionStorage.setItem(“key2”, “value2”); • sessionStorage.getItem(“key1”); // “value1”
• sessionStorage.length; //2 • sessionStorage.removeItem(“key1”); • sessionStorage.length; // 1 • sessionStorage.clear(); • localStorage.length; // 0 Sunday, 20 February 2011
Storing Objects • Key/value pairs • Value is a STRING!
• Stringify / Parse JS Objects • JSON.stringify(myObject); • JSON.parse(myString); Sunday, 20 February 2011
Storage Event • “storage” event • Triggered when Storage Areas
change • Binded on Window • Attributes: • key, • oldValue • newValue • url Sunday, 20 February 2011
Support • IE 8+ • FF 3.5+ • Safari 4+
• Chrome 7+ • Opera 10.6+ • iOS Safari 4.0+ / Android 2.2+ Sunday, 20 February 2011
JS Utilities • YUI2 Storage • Dojo Storage • PersistJS
Sunday, 20 February 2011
Advantages (over Cookies) • Saving Bandwith • Size • Sessions
not leaking • Network sniffing Sunday, 20 February 2011
Limitations • 5 Mb (or 10Mb) • “QUOTA_EXCEEDED_ERR” • “SECURITY_ERR”
• Storage per origin • Cross directory attacks -> DO not USE it! • DNS Spoofing -> SSL Sunday, 20 February 2011
The future of Web Storage • Store data that rarely
change • Mobile Sites • Offline apps • More Storage? Index Database API Sunday, 20 February 2011
Thank you. Sunday, 20 February 2011