<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Session Storage Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/session-storage/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/session-storage/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Wed, 13 Apr 2022 16:30:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Local Storage And Session Storage in JavaScript</title>
		<link>https://www.scmgalaxy.com/tutorials/local-storage-and-session-storage-in-javascript/</link>
					<comments>https://www.scmgalaxy.com/tutorials/local-storage-and-session-storage-in-javascript/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Sat, 14 Aug 2021 13:13:49 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Local Storage]]></category>
		<category><![CDATA[methods]]></category>
		<category><![CDATA[Session Storage]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7959</guid>

					<description><![CDATA[<p>Local Storage The localStorage is a read-only property of the window objects. It stores data in a web browser specifically [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/local-storage-and-session-storage-in-javascript/">Local Storage And Session Storage in JavaScript</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading"><strong>Local Storage</strong></h2>



<p class="wp-block-paragraph">The localStorage is a read-only property of the window objects. It stores data in a web browser specifically to the domain and protocol. It doesn’t get sent to the server as it is stored locally in the web browser with no expiration date. The data will not be deleted when the browser is closed and reopened.</p>



<p class="wp-block-paragraph"><strong>Syntax:- window.localStorage</strong></p>



<h2 class="wp-block-heading"><strong>Methods</strong></h2>



<ul class="wp-block-list"><li>setItem (key, value) – It allows to add a key/value pair to the storage object. If the key already exists, the name value will overwrite the old value.</li><li>getItem(key) – It returns the value of the item that is set with the given key.</li><li>key(n) – It returns the key of the item in the storage object at the nth index which can be useful for looping.</li><li>removeItem(key) – It removes the item in the storage object with the given key.</li></ul>



<h2 class="wp-block-heading"><strong>Session Storage</strong></h2>



<p class="wp-block-paragraph">The sessionStorage is a read-only property of the window object. It stores data in a web browser specifically to the domain and protocol for a particular session. It doesn’t get sent to the server. Data stored in sessionStorage gets cleared when the page session ends. A page session lasts for as long as the browser is open and survives over page reloads and restores.</p>



<p class="wp-block-paragraph"><strong>Syntax:- window.sessionStorage</strong></p>



<h2 class="wp-block-heading"><strong>Methods</strong></h2>



<ul class="wp-block-list"><li>setItem (key, value) – It allows to add a key/value pair to the storage object. If the key already exists, the name value will overwrite the old value.</li><li>getItem(key) – It returns the value of the item that is set with the given key.</li><li>key(n) – It returns the key of the item in the storage object at the nth index which can be useful for looping.</li><li>removeItem(key) – It removes the item in the storage object with the given key.</li></ul>



<figure class="wp-block-image size-full is-resized"><img fetchpriority="high" decoding="async" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/local-storage-and-session-storage-in-javascrip.png" alt="" class="wp-image-7964" width="833" height="474" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/local-storage-and-session-storage-in-javascrip.png 615w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/local-storage-and-session-storage-in-javascrip-300x171.png 300w" sizes="(max-width: 833px) 100vw, 833px" /></figure>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/local-storage-and-session-storage-in-javascript/">Local Storage And Session Storage in JavaScript</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/local-storage-and-session-storage-in-javascript/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
