ENع
الدرس 24 · JavaScript in the browser

Storage in the browser

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

A page's variables vanish when it reloads, but localStorage keeps small pieces of text in the browser, one store per website. Follow a page that counts your visits: getItem finds nothing the first time, setItem stores the string "1", a reload empties memory but not storage, and the second visit reads "1" back, turns it into a number and stores "2".

10 دقيقة11 خطوات5 أسئلةIntermediate
شكل 24 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.