1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Page refresh not working properly in Chrome on Android phone

Discussion in 'Web Design & Development' started by Riverglen, Nov 11, 2018.

Advertisement
  1. Riverglen

    Riverglen Thread Starter

    Joined:
    Aug 28, 2006
    Messages:
    478
    First Name:
    Larry
    I maintain a very simple web page to display data collected by my home built seismograph. Some of the images on the page are updated properly when I go the the page, and some are not.

    My issue will be easier to describe if you refer to the site: lwconklin.pairserver.com.

    The overall page consists of a small amount of text, and several .gif images. All of the .gif files are updated by replacing the old image file with new files of the same name.

    The first three images are automatically updated hourly by the data collection program. The next two are updated manually via a small batch file using ftp. The last three images are manually updated in a similar manner via another ftp based batch file, but only very infrequently.

    My problem is that first three "drum report" images are reliably updated and displayed when the page is opened, but the following two images are not. In Firefox, running under Windows 7, a simple page refresh is effective in updating the images. In Chrome, running on my Android pone, the drum reports show up properly updated, but the following two detailed view images are (as of this moment) two days out of date. And in the Chrome browser, forcing a page refresh doesn't result in these images being updated from the web. Eventually, these images do get updated, but I haven't been able to pin down what triggers the update.

    I am essentially illiterate in HTML and web page design, but it seems as if Firefox and Chrome follow different rules for deciding whether to display elements on the page from the cache or from the web. Also, please note that I am not trying to have the page update in real time while it is being viewed. I just want the most current data that has been uploaded to the site to be properly displayed when the page is opened.
     
  2. JiminSA

    JiminSA

    Joined:
    Dec 15, 2011
    Messages:
    3,242
    First Name:
    Jim
    In order to facilitate a pick up of the latest images on all browsers, you should consider using the no-cache meta tag;)
     
    Last edited: Nov 12, 2018
  3. Riverglen

    Riverglen Thread Starter

    Joined:
    Aug 28, 2006
    Messages:
    478
    First Name:
    Larry
    Well, as it happens, I had a similar issue several years ago, and at the suggestion of someone in this forum I did add the following line to the head of the index.html file:

    <meta http-equiv="Cache-control" content="no-cache">

    I don't remember all of the details regarding the old problem. I was satisfied with the results at that time, but that change doesn't resolve the issues I'm having now.

    I am probably missing something fundamental. I built the page using a freeware tool called Kompozer, and its fair to say that I don't have a deep understanding of the code it generated. All of the images in the page are in separate files, referenced from the index.html file. The way things are acting it seems like some of the image files are outside of the scope of the no-cache tag.
     
  4. JiminSA

    JiminSA

    Joined:
    Dec 15, 2011
    Messages:
    3,242
    First Name:
    Jim
    I'm not saying that this is the answer, but you did miss the inclusion of a second meta tag in the link I gave you. viz:-
    HTML:
    <META HTTP-EQUIV="Expires" CONTENT="-1">
    
     
  5. Riverglen

    Riverglen Thread Starter

    Joined:
    Aug 28, 2006
    Messages:
    478
    First Name:
    Larry
    I hadn't gotten around to updating the page code to add the second tag you referred to. There were quite a lot of comments on the site you referenced that were critical of the suggestion. I am not informed enough to have an opinion on whether the criticism is warranted. But I'll give it a try and see what happens.

    And I still don't understand why performing a manual refresh in the browser (at least in Chrome on my Android phone), doesn't make the browser go back to the web page and update everything with the latest available content?
     
  6. JiminSA

    JiminSA

    Joined:
    Dec 15, 2011
    Messages:
    3,242
    First Name:
    Jim
    No Larry, we need to empty the browser's cache of all images, in order for it to do that and then the refresh will pick up the new images with the same name.:)
    Also bare in mind that the same logic applies to using the no-cache meta-tags;) i.e. the browser will always check the cache first.
    Be careful that you only clear browser cache images you don't want to clear anything else (passwords etc.,)
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...

Short URL to this thread: https://techguy.org/1218994

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice