title: Send push notification on web app after a user submits a form
body: <p>We have a web app that runs on ASP.Net web forms. A user goes to a landing page that ask for some info, and it gets stored on a SQL data table and triggers and email notification to the contact center.</p>
  
  <p>We need, that when some user sumbits the form the contact center agents recieve a push notification from the browser. </p>
  
  <p>The landing page is located at an specific URL, let's say www.mysite.com/landing.aspx and the contact center's front is at www.mysite.com/admin</p>
  
  <p>So far, we've tried using javascript. We have a code that search on the database for new records every minute, but it's loading the server with too much work!</p>
  
  <p>This is the javascript that loads after the one minute task is executed:</p>
  
  <p></p>
  
  <pre><code>    window.onload = function notifyMe() {
          // Let's check if the browser supports notifications
          if (!("Notification" in window)) {
              alert("This browser does not support desktop notification");
          }
  
          // Let's check whether notification permissions have already been granted
          else if (Notification.permission === "granted") {
              // If it's okay let's create a notification
              var notification = new Notification("New form request received!");
          }
  
          // Otherwise, we need to ask the user for permission
          else if (Notification.permission !== 'denied') {
              Notification.requestPermission(function (permission) {
                  // If the user accepts, let's create a notification
                  if (permission === "granted") {
                      var notification = new Notification("New form request received!");
                  }
              });
          }
  
          // At last, if the user has denied notifications, and you 
          // want to be respectful there is no need to bother them any more.
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Do you know a better way to achive this? Thanks!</p>