Refresh a PHP page for every predefined seconds

后端 未结 6 1038
一个人的身影
一个人的身影 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:40

    If you plan on refreshing the entire page, using tags is the cleanest way. It just seems awkward to have a JS timer refreshing your page when you have a fully-supported HTML-only way of doing this.

    However, if you just need a specific part of the page refreshed, use AJAX. It's better in terms of user experience, as well as performance.

提交回复
热议问题