title: Notification system with Firebase triggers on callback on every reload
body: <p>So I'm trying to make a notification system similar to Facebook's system. I have a cron job running in the background and when it feels the need to send out a notification to an user it uses the PHP (REST) SDK to send a push to Firebase. On the dashboard I have an 'on' callback that fetches all incoming notifications for the user and shows a notification for each incoming new notification</p>
  
  <pre><code>var push_ref = firebase_ref.on('child_added', function(push) {
      new PNotify({
          title: 'Notification',
          text: push.val().message,
          ...
      });
  });
  </code></pre>
  
  <p>However, when I reload the page all previously sent notifications pops up simultaneously and fills the screen with notification boxes. I don't wanna delete the sent push notifications because later on I'm gonna make a system to fetch them and put them in a dropdown box (similar to the notification dropdown on Facebook).</p>
  
  <p>My question is;</p>
  
  <p><strong>How can I keep all sent notifications but at the same time disable that Firebase returns all notifications when the client goes online again?</strong></p>
  
  <p><strong>UPDATE:</strong>
  Looked through their documentation again and saw that their retrieving data types are very different. It says under "child_Added" that it <a href="https://www.firebase.com/docs/web/guide/retrieving-data.html" rel="nofollow">"is triggered once for each existing child and then again every time a new child is added to the specified path"</a>. This is why it is triggered once I reload the page with all the existing children.</p>
  
  <p>Can you see any other types that might work for me, because I haven't found any.</p>