So guys .. I know the code below is pretty unnecessary, but I just need to know one thing, actually an answer ...
The code below in my site serves to make refresh in an update icon that shows the number of notifications in case any friend user has liked or commented something like yours, like Facebook. However, I believe that every refresh is opening another port because in the site statistic it shows that it is having 1900,000 views per day which ends up increasing site by stopping the server.
So the question: this setInterval()
with a load()
that searches a file in refresh_notif.php
for every refresh in half a second time '1000' is bad for > site ?
var auto_refresh = setInterval(
function () {
var urlLikes = $("#url_s").val();
$('#4sNotificationsJewel').load(urlLikes +'/refresh_notif.php?user=<?php print $user_id; ?>').fadeIn("slow");
}, 1000);