<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: John Stritzinger</title>
    <description>The latest articles on DEV Community by John Stritzinger (@jssg33).</description>
    <link>https://dev.to/jssg33</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1171657%2Fb026ba81-2ce4-458b-8a98-d3f260214479.png</url>
      <title>DEV Community: John Stritzinger</title>
      <link>https://dev.to/jssg33</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jssg33"/>
    <language>en</language>
    <item>
      <title>Accessing Local Storage variables from Javascript</title>
      <dc:creator>John Stritzinger</dc:creator>
      <pubDate>Wed, 27 Sep 2023 16:35:10 +0000</pubDate>
      <link>https://dev.to/jssg33/accessing-local-storage-variables-from-javascript-4723</link>
      <guid>https://dev.to/jssg33/accessing-local-storage-variables-from-javascript-4723</guid>
      <description>&lt;p&gt;ok.... I can read and write local storage variables via javascript with no problem as follows:&lt;/p&gt;

&lt;p&gt;localStorage.set("testvariable", "3");&lt;br&gt;
testvar = localStorage.get("testvariable);&lt;/p&gt;

&lt;p&gt;And I can even verify these statements work from Developer Tools in Mozilla, Chrome, and Edge (They are ubiquitious).....&lt;/p&gt;

&lt;h1&gt;
  
  
  BUT
&lt;/h1&gt;

&lt;p&gt;I write variables from my sso (sso.acme.com), and from my webroot (acme.com)&lt;/p&gt;

&lt;p&gt;I need to write one function which can retrieve testvariable.sso.acme.com and testvariable.acme.com which are shown separately in the browser debug. (Yes I know cookies work too but I dont want to use that method for different reasons).&lt;/p&gt;

&lt;p&gt;It appears there is a way to set your context to sso.acme.com before I call local.storage.get?&lt;/p&gt;

&lt;p&gt;I wanna write something like.....&lt;br&gt;
function parser()&lt;br&gt;
{&lt;br&gt;
setcontext(sso.acme.com); (this function doesnt exist??)&lt;br&gt;
a = localStorage.getItem("testvariable);&lt;br&gt;
setcontext(acme.com);&lt;br&gt;
b = localStorage.getItem("testvariable);&lt;br&gt;
c = a + b;&lt;br&gt;
alert (c);&lt;br&gt;
}&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
