How to update all users page automatically after delete of posts on forum page without page reload

How to update all users page automatically after delete of posts on forum page without page reload

Kindly assist please.
I'm working on a forum page with php and jquery/ajax. When i delete a post, my page is immediately updated. However, other logged-in users still see the deleted post until their pages are reloaded. What i want is a functionality that updates all logged in users pages without page reload. My fetch_posts.php file outputs the result of the sql select statement as a JSON encoded data to my jquery file. Here is some of the relevant contents of my jquery file.

  1. function fetchPosts(){                 //To fetch posts from database
  2.       $.getJSON("fetch_posts.php", function(data){
  3.             $.each(data, function(i, value){
  4.                   //if post does'nt exist on page b4, prepend posts to doc
  5.                   if ($('.media-wrapper .media[data-id = '+value.id+']').length == 0){
  6.                         var post = //"some posts'';
  7.                         $(".media-wrapper").prepend(post);
  8.                   }
  9.             });
  10.       });
  11. }
  12. setInterval(fetchPosts, 5000);
  13. //To delete a post the logged in user authored
  14. $(document).on("click", ".post_delete", function(e){
  15.         e.preventDefault();
  16.         var post_id = $(this).attr('del-id');
  17.         var post= $('.media-wrapper').find('.media[data-id = '+post_id+']');
  18.         if(confirm("Are you sure you want to delete the post?")){
  19.             $.post("del_post.php", {"post_id": post_id}, function(data){
  20.                 if (data == "yes"){
  21.                     $(post).remove();
  22.                     fetchPosts();
  23.                 }
  24.             });
  25.         }
  26.     });
Thanks in anticipation of your guidance in resolving this.