Ticket #278 (closed defect)

Opened 8 years ago

Last modified 8 years ago

add timestamp to heli_ewII so browser doesn't cache GIF file

Reported by: paulf Owned by: somebody
Priority: major Milestone: All Platforms
Component: heli_ewII Version: 7.7
Keywords: Cc:

Description

The browser will cache the GIF file from the index.html HREF tab once it is loaded, unless something in the URL that says it is different. Allan Walter wants to see a test of putting a time-stamp into the HREF URL helps.

Note that the index.html also needs a !<meta refresh=!> tag added as well.

here is our discussion in email:

Allan writes:

Yes, let's try putting a dummy ?v=timestamp at the end of the gif href generated by the code to see if the browser downloads then downloads latest copy of the gif from the server. Because the way it is now I still have to do a right-click refresh inside the browser panel just after I do a refresh of that index page from the browser toolbar.

Allan Walter USGS
626 583-7225 Office

On 6/5/2013 06:28, Paul Friberg wrote:
> Allan Walter wrote:
>> Can somebody modify the heli_ewII source that writes the html/gif so that it adds a version timestamp to the the web page href so that a browser refresh will ownload the updated image from the server instead of showing the stale copy in the cache ?
>>
> oh, I think I know what you want now!
>
> you want a way to muck with the href so that the gif has some timestamp at the end so that the browser doesn't cache it...
>
> Something like the href in the index.html:
>
> <a href="mynet.P09_EHN_XR_00_00.2013060512.gif" > 06/05/2013 12:00</a>
>
> should be changed to have a dummy timestamp link:
>
> <a href="mynet.P09_EHN_XR_00_00.2013060512.gif?v=130438349.05" > 06/05/2013 12:00</a>
>
> where every time the index.html is written it updates that. The index will also need a <meta tag to refresh every so often>.
>
> Was that what you were thinking? Would the above even work?
>
> Cheers,
>
> Paul
>

Change History

comment:1 Changed 8 years ago by paulf

Looking at this heli_ewII program in a bit more detail, it only updates the index.html file when it starts creating a new .gif image (which makes total sense). To add in a time tag to the href for each gif file will require rewriting the index file after each image update...which could get onerous if they update too quickly. The default image update is every 2 minutes so that should not be too bad....

comment:2 Changed 8 years ago by paulf

  • Status changed from new to closed

Okay, looks like the changes fixed a bug (found by Allan Walter) and allowed updates to heli_ewII index files to keep the .gif images links updating.

Note: See TracTickets for help on using tickets.