Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to get my website to refresh automatically.

Explorer ,
Apr 16, 2025 Apr 16, 2025

Hello. I need to get the site I'm working on to refresh automatically (much like major news websites which will refresh every 30 seconds or so, but nowhere near that degress of frequency) every hour or so and can't find any way to do that. Is there code I need to add to the header of the index.htm to make that happen?  Thanks.

TOPICS
Browser , Code , How to , Performance , Publish
86
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2025 Apr 16, 2025

Hi @MalibuEd , refreshing your website automatically every hour is achievable with a small addition of code to your site's <head> section in the index.htm. Here's a simple way to do it using HTML meta tags:

<head>
    <meta http-equiv="refresh" content="3600">
</head>

This line of code tells the browser to refresh the page after 3600 seconds (1 hour). You can adjust the content value to your desired time interval in seconds.

 

Alternatively, if you're using JavaScript and want more control, you could use a script like this:

<script>
    setTimeout(function() {
        location.reload();
    }, 3600000); // 3600000 milliseconds = 1 hour
</script>

You can place this <script> tag in the <head> or at the bottom of your page before the closing </body> tag. This approach gives you flexibility for adding conditions or specific functionality during the refresh.

 

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 16, 2025 Apr 16, 2025

Thank you very much! I appreciate the the help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2025 Apr 16, 2025
LATEST

Force refresh pages in your browser with Ctrl/Cmd + R or Ctrl/Cmd + F5.

Or consult your browser's advanced tools for details on clearing cached data.

 

If your server is caching data on their end, there's nothing you can do except wait.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines