Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6157887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:51:46+00:00 2026-05-23T20:51:46+00:00

Possible Duplicates: Refresh Image PHP and Javascript How to reload img every 5 second

  • 0

Possible Duplicates:
Refresh Image PHP and Javascript
How to reload img every 5 second using javascript ?

i need an image on my website to refresh every 10 mins, but i dont want it to refresh the whole website

im not even sure if this is possible but if it is can you please help me
many thanks
connor

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:51:46+00:00Added an answer on May 23, 2026 at 8:51 pm

    Every time you want to reload the image, you must change the image url like so: “screen.jpg?rand=123456789” where “123456789” is a randomly generated number, which is regenerated every time you want to reload the image. The browser will think that it is a different image, and actually download it again, instead of retrieve it from the cache. The web server will most likely ignore and discard everything after the question mark.

    To cause the reload in the first place, your would have to use Javascript to get the image element and change the source. The easiest option I can see is to give the image element an id attribute, like so:

    <img src="screen.jpg" id="myImage" />
    

    Then you may change the source of the image:

    var myImageElement = document.getElementById('myImage');
    myImageElement.src = 'screen.jpg?rand=' + Math.random();
    

    To do this on a set timer, then use the top-level Javascript function setInterval:

    setInterval(function() {
        var myImageElement = document.getElementById('myImage');
        myImageElement.src = 'screen.jpg?rand=' + Math.random();
    }, 5000);
    

    The second argument specifies 5000 milliseconds, which equates to 5 seconds.

    This is a quote from: How to reload img every 5 second using javascript?

    This method pretty much describes exactly what you seem to want. All you need to do is change the time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicates: How to programmatically download image from website ? Download all images from
Possible Duplicates: Is there a problem that has only a recursive solution? Can every
I found a bunch of possible duplicates around this but none really seemed to
Possible Duplicates: How do I stop the Back and Refresh buttons from resubmitting my
Possible Duplicates: ASP.NET- Sending an e-mail how to send mail using C#? How can
Possible Duplicates: Advice on using ASP.net WebForms or MVC How to decide which is
Possible Duplicates: How do I use that “<<<HTML” thing in PHP? PHP <<<EOB $sql
Possible Duplicates: Disable browser's back button How do I disable the F5 refresh on
Possible Duplicate: how to refresh an iframe automatically I need to refresh an iframe
Possible Duplicate: How does GitHub change the URL but not the reload? Hi folks,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.