title: Javascript, delete the last item in history (firefox addon)
body: <p>I have a Firefox addon that first displays a warning/info page telling the user they are being redirected (chrome://localfilter/content/wait_page.html) then redirects them to their destination.</p>
  
  <p>Everything is working great.</p>
  
  <p>The only thing is when/if they press the back button they see that "wait page", is there anyway to delete just that wait page from the history and leave everything else as is?
  Or if that is not possible replace that wait page with another page that perhaps has just the logo (because if they read they are getting redirected and nothing happens...)</p>
  
  <p>EDIT:</p>
  
  <pre><code>// function to see if the banned URL is on the list, then redirect
  ...
  window.stop(); // Totally stop the page from loading.
  
                              window.content.location.href = "chrome://quickfilter/content/wait_page.html";
  
  
  
                              this.notificationBox();
                              self.timervar = setTimeout(function ()
                              {
                                  self.main.redirectToAnotherUrl();
                              }, 2505);
  
  ...
  
  
  redirectToAnotherUrl: function ()
              {
  
  
                  window.content.location.href = self.mafiaafireFilterUrl;
                  self.timervar = setTimeout(function ()
                              {
                                  self.main.notificationBox();
                              }, 2005);
  
  
              }
  </code></pre>
  
  <p>Changed with replace:</p>
  
  <pre><code>redirectToAnotherUrl: function ()
              {
  
  
                  window.content.location.replace(self.mafiaafireFilterUrl);
                  self.timervar = setTimeout(function ()
                              {
                                  self.main.notificationBox();
                              }, 2005);
  
  
              }
  </code></pre>