WordpressExtra
Photo of author

Auto Refresh Website Script For WordPress

Auto Refresh Website Script For WordPress

WordPress

WordPress is one of the famous platform for website which is free until you don’t want to monetize it + required hosting which is costly . If you are not a begginer then you are good to go using wordpress required little knowledge about theme and plugins etc.

WordPress is best because there is no limit from wordpress side, you can customize your website as you desire using paid themes and paid plugins but on other there is limit in blogger

Also Good to achieve good seo ranking using plugins and track your website

Cons

  • Required knowledge
  • Need money for both hosting and theme
  • Most Plugins are limited for free users you need to buy plugins
  • Not easy to use

If you have money to invest then go for it

Installation

  1. Access Your WordPress Dashboard
  2. Edit Your WordPress Theme
  3. Depending on your WordPress setup, you can edit your theme’s header.php file to add the JavaScript code.
  4. In the WordPress dashboard, go to “Appearance” > “Theme Editor.”
  5. On the right-hand side, you will see a list of theme files. Look for “header.php” in the list and click on it to open the file for editing.
  6. Add the JavaScript Code Inside the header.php file, add the following JavaScript code just before the closing </head> tag
  7. After adding the JavaScript code, click the “Update File” button to save your changes.
<script type="text/javascript">
  // Function to reload the page every 10 seconds
  function reloadPage() {
    setTimeout(function () {
      location.reload();
    }, 10000); // 10000 milliseconds (10 seconds)
  }

  // Call the reloadPage function to start the timer
  reloadPage();
</script>

Now, your WordPress website will automatically refresh every 10 seconds.

What does it do to your website ?

It will refresh the page automatically after every 10 second

#Warning : Time is set to 10 Second , Increase it

Else your website view will be count as spam

Using this you will get extra views that will help you to achieve page impressions and chance to increase ad revenue

Use It at your own risk

Make sure you have adsense approval. Don’t use this to get approval

You can try but atleast set timer to 40 second

Conclusion

In this article we share a Auto Refresh Website Script For wordpress which automatically refresh the page after your desire time . It just a java script, use it at your ownrisk

Leave a Comment