Refresh a PHP page for every predefined seconds

后端 未结 6 1142
一个人的身影
一个人的身影 2021-01-26 17:06

I would like to load/refresh a particular page for every 10 secs to view updated data\'s fetched from Database.

I used META for doing it

 

        
6条回答
  •  天命终不由人
    2021-01-26 17:30

    For the client, there's really no difference between all the methods you mentioned. The only difference I can find is that using doesn't require javascript, like other solutions do, but nowadays everybody has javascript anyway.

    The big difference, to me, is in the server usage. If you have 100 users refreshing every 10 seconds, that's already about 10 reqs/sec. Depending on the logic you have to generate the page (which is likely dinamic), this may cause the server usage to skyrocket. Make sure you're careful about that.

提交回复
热议问题