• Skip to main content
  • Skip to primary sidebar

Technipages

Tutorials and fixes for smartphone, gadget, and computer problems

  • Topics
    • Android
    • Browsers
    • Gaming
    • Hardware
    • Internet
    • iPhone
    • Linux
    • macOS
    • Office
    • Reviews
    • Software
    • Windows
    • Definitions
  • Product Reviews
  • Downloads
  • About
How to Auto Refresh Chrome Tabs Without an Extension

How to Auto Refresh Chrome Tabs Without an Extension

November 10, 2021 by Madalina Dinita 8 Comments

Suppose you want to automatically refresh your Google Chrome tabs. In that case, you can install a browser extension to get the job done. You can then set custom time intervals to reload your tabs. Many users choose to refresh web pages automatically to remain logged in. But what if you don’t want to install a third-party extension to reload your tabs? Let’s explore the alternatives.

How to Auto-Refresh Chrome Tabs Without Downloading Anything

You can use a special script to instruct Chrome to reload tabs from time to time. You can run the script either as a bookmark or inject it straight into the browser console. You’ll need to always keep the bookmark or browser console tab open for this method to work.

Method 1: Use Tab A to Control Tab B

Open a new tab, and press Ctrl, Shift, and I to open the Chrome console. Then enter the following script:

win1 = window.open("https://www.yourpage.com");
timer1 = setInterval(function(){win1.location.href="https://www.yourpage.com"},10*60*1000);

Basically, win1 is a Javascript variable for Tab B. The setInterval function calls the win1 variable (Tab B) to reload every 10 minutes.

Keep both tabs open for this method to work. If you want to end the auto-refresh script, simply close your tabs. You can use the script above to control multiple tabs. Of course, you’ll need to tweak the script a bit and add multiple win variables, and setInterval functions.

There are two main advantages to using this script: you can reload a web page you have absolutely no control over. The script won’t disappear when the second tab is refreshed.

Method 2: Run the Auto-Refresh Script as a Bookmark

Launch a new tab and paste the script below into your address bar:

javascript:document.getElementsByTagName("body")[0].innerHTML =
"<iframe id=\"testFrame\"
src=\"" + window.location.toString() + "\"
style=\"position: absolute; top:0; left:0; right:0; bottom:0; width:100%; height:100%;\">
<\/iframe>";
reloadTimer = setInterval(
function(){
document.getElementById("testFrame").src=document.getElementById("testFrame").src
},
10000
)

Then save the script as a new bookmark. By entering the script as a bookmark, you force the browser to keep the JavaScript prefix which it would otherwise remove. Basically, you’re replacing the document body with an iframe. The setInterval function is the trigger that reloads the page according to your time interval settings.

Keep in mind that certain web pages may refuse to display any content once they’ve detected you’re using an iframe.

Method 3: Run the Auto-Refresh Script in the DevTools console

First, load the page you want to refresh. To run the auto-refresh tab script in the DevTools console, you first need to open the console. On Windows, press the Shift, Ctrl, and I keys. On macOS, press Option, Command, and J. Alternatively, you can also click on More options (the three vertical dots), select More tools, and then click on Developer tools.run-tab-auto-refresh-script-chrome

Then click on the Console tab and enter the script below:

document.getElementsByTagName("body")[0].innerHTML= `<iframe id="testFrame" src=""+window.location.toString()+"" style="position: absolute; top:0; left:0; right:0; bottom:0; width:100%; height:100%;"> </iframe>`; setInterval(()=>{document.getElementById("testFrame").src=document.getElementById("testFrame").src},10000);

Well, suppose you don’t really feel comfortable running these scripts. In that case, you can use a browser extension to automatically reload your tabs from time to time.

Conclusion

To automatically refresh Chrome tabs, you can inject a unique script directly into the browser console. Alternatively, you can save the script as a bookmark. If these methods don’t work, you can use a browser extension that automatically reloads your tabs.

Did you manage to run the scripts above? Let us know in the comments below.

You Might Also Like

  • Chrome: How to Refresh Various Tabs Simultaneously
    Chrome: How to Refresh Various Tabs Simultaneously
  • Chrome: How to See Which Tabs Use the Most Recources
    Chrome: How to See Which Tabs Use the Most Recources
  • How to Move Tabs Around - Google Chrome
    How to Move Tabs Around - Google Chrome
  • How to Group Open Tabs on Chrome
    How to Group Open Tabs on Chrome
  • Prevent Old Chrome Tabs from Opening at Startup
    Prevent Old Chrome Tabs from Opening at Startup
  • Chrome: How to Turn on Memory Saver Tabs
    Chrome: How to Turn on Memory Saver Tabs

Filed Under: Internet Tagged With: google chrome

Reader Interactions

Comments

  1. josh says

    December 7, 2022 at 5:20 pm

    can you add a line that stops the auto refresh when the page that keeps on refreshing changes? for example:
    page will auto refresh to google.com.. i have a script that when a button appears it will click that button and move to yahoo.com. I want the auto refresh to stop when its at yahoo.com

  2. didier says

    December 6, 2022 at 12:54 am

    could this BE more complicated?
    wht the fark doesnt Ctrl-R work anymore

    2022 all teh tech in the world but chrome keeps showing my cached page from 3 years ago.

  3. James says

    September 22, 2022 at 9:27 am

    Doesn’t work for me, not any f the 3 solutions :(
    Especially the first one. I set it for every second, and I don’t see any realoading. mouse cursor or tab aniamtion. Is it normal or am I missing something ?

  4. Lynn Duerksen says

    September 10, 2022 at 6:34 pm

    I have used method 2 successfully in the past. However, the site is now detecting the iframe and it no longer works.
    Do you have something that will work without iframes?

  5. jimmy says

    August 15, 2022 at 10:46 am

    Thank you for providing this info.
    HOWEVER, I don’t code in HTML, so I would appreciate if you would provide step-by-step instructions for inserting this code into the tab code. Also, if you can convert this to a bookmarklet, that would be super.

  6. RemmieV says

    May 9, 2022 at 4:05 am

    It would be nice to load one of those solutions (preferred method 2) through a self created extension, if that’s even possible. I’m trying to figure out how to create an extension. Why? Cause 1) I don’t want to use a third-party extension 2) the user shouldn’t have to do all manual actions to auto-refresh open a page, it should go automatically. Any ideas?

  7. drax says

    January 9, 2022 at 2:32 pm

    hello may i request additional script like it will be stop if it finds a new content on the tab thanks.

  8. Alexandre says

    November 26, 2021 at 10:00 am

    AMAZING!

Did this help? Let us know!

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Recent Posts

  • How to Make a Drop-Down List in Excel: 2 Best Methods in 2023
  • Can You Mix RAM Brands: A Guide for RAM Mix and Match
  • Google Photos: How to Recover Erased Pictures
  • New Galaxy S23: Full Specs, Features, and More
  • How to Block Calls on Android
  • Mimecast for Outlook: Everything You Need to Know
  • What Is PoE?
  • Excel Calendar Template 2023: The 9 Best Sources You Must Know

Who’s Behind Technipages?

Baby and Daddy My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

You May Also Like

  • The 8 Best Adblockers for Chrome
  • Top 10 Google Chrome Alternatives to Surf Better

© Copyright 2023 Guiding Tech Media · All Rights Reserved · Privacy