We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

This translation is incomplete. Please help translate this article from English.

localStorage özelliği, yerel Storage objesine erişim imkanı verir. localStorage özelliği sessionStorage özelliğine benzemektedir. Aralarındaki tek fark, localStorage özelliğinde saklanan verinin sona erme tarihi yok iken, sessionStorage özelliğinde saklanan veri web tarayıcısı oturumu sona erdiğinde "web tarayıcısı kapatıldığında" silinmektedir.

localStorage veya sessionStorage özelliklerinde saklanan verilerin, sayfanın protokolüne özgü olduğuna dikkat edilmelidir.

Söz Dizimi

myStorage = localStorage;

Değer

Storage.

Örnek

The following snippet accesses the current domain's local Storage object and adds a data item to it using Storage.setItem().

localStorage.setItem('myCat', 'Tom');

Note: Please refer to the Using the Web Storage API article for a full example.

Specifications

Specification Status Comment
Unknown
The definition of 'localStorage' in that specification.
Unknown  

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
localStorage 4 (Yes) 3.5 8 10.50 4
sessionStorage 5 (Yes) 2 8 10.50 4
Feature Android Edge Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 2.1 (Yes) ? 8 11 iOS 3.2

All browsers have varying capacity levels for both localStorage and sessionStorage. Here is a detailed rundown of all the storage capacities for various browsers.

Note: Starting with iOS 5.1, Safari Mobile stores localStorage data in the cache folder, which is subject to occasional clean up, at the behest of the OS, typically if space is short. Safari Mobile's Private Browsing mode also prevents writing to localStorage entirely.

See also

Document Tags and Contributors

Contributors to this page: erolkeskin
Last updated by: erolkeskin,