cancel
Showing results for 
Search instead for 
Did you mean: 

xMII page refresh

Former Member
0 Kudos

Hello all,

I have a page which has some svg images on it.Since these images keep changing over time, my requirement is to have the page to continuously refresh so that the new image gets updated every minute. So I have set a auto refresh of 1 min using the code - <meta http-equiv="Refresh" content="60"> in the html page.

Problem:

1) It appears that the page stops refreshing after some time (say after 2 - 3 hrs). How could this happen. I have also increased the timeout in xMII to a big value. If it was an applet, i could have changed the auto refresh setting in the template.

2) Each time the page refreshes, it displays some other page that was probably there in memory. I have to re-refresh this to display the correct page. Is there something we could do to make it pull the correct page the first time without referring to the memory/cache?

Any ideas/help or workarounds for these problems would be highly appreciated.

Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

abesh
Contributor
0 Kudos

Jeremy is right ! It is a caching issue.

Try this and this might work (Works for me )

var Time;
function doit(){
executeQry();
imagename = "Fan.jpg";
tmp = new Date();
tmp = "?"+tmp.getTime()
document.images["refresh"].src = imagename+tmp;
Time = setTimeout("doit()", 1000);
}

Former Member
0 Kudos

The cache problem persists!

I am generating the images on the back-end and just calling them in the front-end.

Any other ideas appreciated.

Former Member
0 Kudos

On the client browser what are the IE settings for Temporary Internet Files?

( From the browser menu go to Tools-Internet Options-General-Temp Internet Files settings.)

Here the setting for check for newer versions of stored pages should be "Every Visit to the Page".

See if this makes any difference.

This is IE 6 I am talking about.

One question - is this an HTML or a IRPT?

Former Member
0 Kudos

Sirnivasan

Abesh's Solution looks fine to me,

Another work around would be giving 'id' to your image HTML tag and then in the doit() function you could do document.getElementById('imageId').src='imagePath';

Hope this will help

Rupesh

jcgood25
Active Contributor
0 Kudos

Have you tried adding these entries in the HEAD section?

<meta http-equiv="Expires" content="0">

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

<meta http-equiv="Pragma" content="no-cache">

Regards,

Jeremy

Former Member
0 Kudos

Jeremy,

This didn't work. Any other ideas how this could be achieved (calling the correct images first time right instead of reloading the page again)

Regards

Srini

Former Member
0 Kudos

I would use somethign like this:

<a href="http://www.plus2net.com/javascript_tutorial/timer-set.php">http://www.plus2net.com/javascript_tutorial/timer-set.php</a>