Auto Refresh Webpage after every x Second or Minute using Meta Tag?



Auto Refresh Webpage using HTML Meta Tag

If you have a use-case where you want to refresh a webpage on the client browser every x seconds or minute, you can make use of the meta tag in the head section with attributes http-equiv="refresh" and content with a value of the interval in which the page should be refreshed in seconds.


Example: Refresh Page every 5 minutes
<html>
<head>
<meta http-equiv="refresh" content="300">
</head>
....
....
</head>
</html>

Note: Make sure to add the meta tag in the head section of the HTML page.

-

Facing issues? Have Questions? Post them here! I am happy to answer!


Author Info:

Rakesh (He/Him) is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap