title: Why is this AJAX call not working in IE 11?
body: <p>I have a notifications system on my site, that utilizes AJAX to update in real-time. The problem is that it works on every browser except IE 11. After looking around I noticed some people advising to use <code>cache:false</code> in the call. However, this makes the code non-functional across all browsers. Anyone know what the solution is?</p>
  
  <p>JAVASCRIPT:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function(){
  
  $('.notif_count').html('0');
  
   function load_unseen_notification(view = '')
   {
    $.ajax({
     url:"notif_follow.php",
     method:"POST",
     data:{view:view},
     dataType:"json",
     success:function(data)
     {
      $('.notif_follow').html(data.notification);
      if(data.notif_count &gt; 0)
      {
       $('.notif_count').html(data.notif_count);
      }
     }
    });
   }
  
   load_unseen_notification();
  
   $(document).on('click', '.notif', function(){
    $('.notif_count').html('0');
    load_unseen_notification('yes');
   });
  
   setInterval(function(){ 
    load_unseen_notification();; 
   }, 5000);
  
  });
  &lt;/script&gt;  
  </code></pre>
  
  <p>PHP:</p>
  
  <pre><code>&lt;?php
  session_start();
  require_once 'class.channel.php';
  
  $user_notif = new USER();
  
  $user_id = $_SESSION['userID'];
  
  if(isset($_POST["view"]))
  {
  
  if($_POST["view"] != '')
  {
  $stmt = $user_notif-&gt;runQuery("UPDATE notif_follow SET status = 1 WHERE receive_id = ?");
  $stmt-&gt;bindValue(1,$user_id);
  $stmt-&gt;execute();
  }
  
  $stmt = $user_notif-&gt;runQuery("SELECT * FROM tbl_users WHERE userID=:uid");
  $stmt-&gt;execute(array(":uid"=&gt;$user_id));
  $row = $stmt-&gt;fetch(PDO::FETCH_ASSOC);
  
  $stmt = $user_notif-&gt;runQuery("SELECT * FROM notif_follow WHERE receive_id= ? ORDER BY id DESC LIMIT 5");
  $stmt-&gt;bindValue(1,$user_id);
  $stmt-&gt;execute();
  $notifs = $stmt-&gt;fetchAll(PDO::FETCH_ASSOC);
  
  $notification = '';
  
  if(count($notifs) &gt; 0)
   {
    foreach($notifs as $notif)
    {
  
    $send_id = $notif['send_id'];
  
    $query2 = $user_notif-&gt;runQuery("SELECT * FROM following WHERE user1_id=:uid1 AND user2_id=:uid2");
    $query2-&gt;execute(array(":uid1"=&gt;$user_id,":uid2"=&gt;$send_id));
    $query2result = $query2-&gt;fetchAll(PDO::FETCH_ASSOC);
  
    if(count($query2result) &gt; 0){
    $follow = '&lt;a href="followoff.php?id='.$send_id.'"&gt;&lt;button class="button" style="margin:2px;"&gt;Remove Channel&lt;/button&gt;&lt;/a&gt;';
    }
    else{
    $follow = '&lt;a href="followon.php?id='.$send_id.'"&gt;&lt;button class="button" style="margin:2px;"&gt;Add Channel&lt;/button&gt;&lt;/a&gt;';
    }
  
    $notification .= '
     &lt;li&gt;
       &lt;div class="notifbox"&gt;
         &lt;strong style="color: #4b8ed3;"&gt;'.$notif["send_name"].'&lt;/strong&gt;&lt;p style="color: #fff;"&gt; has added you.&lt;/p&gt;
  
       '.$follow.'
  
         &lt;a href="index.php?id='.$notif["send_id"].'"&gt;&lt;button class="button" style="margin:2px;"&gt;View Channel&lt;/button&gt;&lt;/a&gt;
       &lt;/div&gt;
     &lt;/li&gt;
     &lt;div class="sectionheader3"&gt;&lt;/div&gt;
     ';
  
    }
   }
   else
   {
    $notification .= '&lt;li&gt;&lt;h2 style="color: #4b8ed3; padding: 10px;"&gt;No Notifications Found&lt;h2&gt;&lt;/li&gt;';
   }
  
  $count = $user_notif-&gt;runQuery("SELECT * FROM notif_follow WHERE receive_id= ? AND status= 0");
  $count-&gt;bindValue(1,$user_id);
  $count-&gt;execute();
  $countresult = $count-&gt;fetchAll(PDO::FETCH_NUM);
  
  if(count($countresult) &gt; 0){
    $notif_count = count($countresult);
  }
  else{
    $notif_count = 0;
  }
  
  header('Content-type: application/json');
  $notif_array = array('notification'=&gt;$notification,'notif_count'=&gt;$notif_count);
  echo json_encode($notif_array);
  
  }
  ?&gt;
  </code></pre>