title: XMLHttpRequest works in Firefox but not in Chrome?
body: <p>I'm trying to write an function that collects information from a contact form, makes a XMLHttpRequest to postmail.invotes.com/send, which forwards an email. The weird thing is, this code works in Firefox but it doesn't work in Chrome.</p>
  
  <p>In the Network tab, the send request is <strong>(failed)</strong> with <strong>net::ERR_CERT_DATE_INVALID</strong> ; is that something I can fix, or the postmail.invotes.com website needs to fix?</p>
  
  <pre><code>function js_send() {  // User has clicked send email button.
      let request = new XMLHttpRequest();
      request.onreadystatechange = function() {
          if (request.readyState == 4 &amp;&amp; request.status == 200) {
              js_onSuccess();  //Return sent message alert.
          } else
          if(request.readyState == 4) {
              js_onError(request.response);  //Return failed message alert.
          }
      };
  
      let fname = document.querySelector("#" + form_id_js + " [name='fname']").value;
      let reply_to = document.querySelector("#" + form_id_js + " [name='reply_to']").value;
      let subject = document.querySelector("#" + form_id_js + " [name='subject']").value;
      let text = document.querySelector("#" + form_id_js + " [name='text']").value;
  
      if (fname &amp;&amp; reply_to &amp;&amp; subject &amp;&amp; text) {  // Only try to send a message if user has entered all 4 values.
          data_js['subject'] = `You have a new message from your Portfolio: ${subject}`;
          data_js['text'] = `You have a new message from your Portfolio! \n\n Subject: ${subject} \n Email: ${reply_to} \n Text: ${text} \n Sender: ${fname}`;
          let params = toParams(data_js);
  
          request.open("POST", "https://postmail.invotes.com/send", true);
          request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  
          request.send(params);
      } else {  // User has not entered all 4 values.
          alertMessage.innerHTML = "Please fill out form completely.";
      }
  }
  </code></pre>