title: dojo.cookie(id) not able to look up cookie by id intermittently
body: <pre><code>_setPrintExportCookieInterval: function(/**String*/requestId, /**function*/closePopup) {
      //have the interval autoexpire after some amount of seconds
      var count = 0;
      var intervalMs = 2000;
  
      var intervalId = self.setInterval(function() {
          var reportCookie = dojo.cookie(requestId);
          console.debug('requestId ' + requestId);
          if(reportCookie || count &gt; 300000) { //5 mins
              //if there's a status failure, don't close the window
              console.debug('reportCookie ' + reportCookie);
              if(reportCookie == undefined){
                  console.debug("print/export request returned with undefined status ");
              } else if(reportCookie == "success") {
                  closePopup();
              }  else{
                  console.debug("print/export request returned with nonstandard status " + reportCookie);
              }
              window.clearInterval(intervalId);
              //delete the cookie
              dojo.cookie(requestId, null, {path: "/", expires: -1});
              //destroy the iframe
              //dojo.destroy(dojo.byId(requestId));
          };
          count+=intervalMs;
      }, intervalMs);
  
      return intervalId;
  },
  </code></pre>
  
  <p>I'm having problems with the above javascript function.  The problem generally is that sometimes:</p>
  
  <pre><code>var reportCookie = dojo.cookie(requestId);
  </code></pre>
  
  <p>returns <code>null</code>, but when I look in my browser's debugging tool I'm able to see that the cookie exists with a value of <code>success</code>.  This happens one in every 10 times this function is called.  Any ideas why <code>dojo.cookie()</code> is not able to look up the cookie by ID only some of the time?</p>