title: Localstorage getItem and setItem not working in ie 9
body: <p>I have tried searching through SO where i get some sort of idea how to enable setItem and getItem in ie9 but no use it was not working in ie 9</p>
  
  <pre><code>function assignValue() {
      var checkedRadioValue = -1;
      if (document.getElementById("ug").checked)
      {
          checkedRadioValue = 1;
      }
      else if(document.getElementById("pg").checked)
      {
          checkedRadioValue = 2;
      }
      else if(document.getElementById("cu").checked)
      {
          checkedRadioValue = 3;
      }
      //localStorage.setItem("CheckedRadioValue", checkedRadioValue);
  
      localStorage.setItem("CheckedRadioValue", checkedRadioValue);
  }
  </code></pre>
  
  <p>Actually i am trying some thing like this for ie9</p>
  
  <pre><code>if(window.localStorage) { 
      localStorage.setItem("CheckedRadioValue", checkedRadioValue);
  }
  </code></pre>
  
  <p>like this I am trying to get the value using localstorage in ie9 this was working perfectly in chrome, firefox </p>
  
  <pre><code>var checkedRadioValue = parseInt(localStorage.getItem("CheckedRadioValue"));
      if (checkedRadioValue != -1) {
          if (checkedRadioValue === 1) {
              $('.local_Field ').each(function() {
                  $(this).rules("remove","required");
              });
          }
          else if (checkedRadioValue === 3){
              $('.local_Field').each(function() {
                  $(this).rules("remove","required");
              });
              $("#edu_info").hide();
              $(".local_Field").removeClass('required_Field');
              //$('.local_Field ').addClass('chumma');
          }
          else{
              $('.local_Field ').each(function() {
                  $(this).rules("add","required");
              });
               $(".local_Field").addClass('required_Field');
          };
          //localStorage.removeItem("CheckedRadioValue");
      }
  </code></pre>
  
  <p>This what the error i am geting in IE10</p>
  
  <pre><code>SCRIPT5007: Unable to get property 'getItem' of undefined or null reference 
  </code></pre>
  
  <p>Thanks in advance</p>