Frames in web page refreshing

  smartdave 01:23 07 Dec 2003

At my website I have a page that has three frames. One frame allows users to select a picture to be displayed in the third frame. They can select a picture without problem. But if I were to upload a new picture to replace it, the old picture (which does not even exist anymore) will still be shown. The "Refresh" button in IE just refreshes the main page, not the loading of the individual frame pages. Please help. click here

  tbh72 13:25 07 Dec 2003

Press & Hold CTRL + F5

  smartdave 14:38 08 Dec 2003

This (Ctrl F5) does solve the refresh problem for me. But I also want a webpage that refreshes the picture automatically. Unless I put a note on the webpage asking people to type Ctrl F5, their pictures will not change.

I need a global solution.


  Taran 14:51 08 Dec 2003

So, you are worried that your viewers may have your page cached in their browser history and any new page elements may not be displayed correctly ?

If that is the case can you confirm ?

There are lots of ways around this from complex JavaScripts to simply renaming the page the new image sites on and updating the hyperlink that points to it,

You can also set some information in the page header to disallow page caching to begin with, meaning no matter how often someone visits your page they will display what is there, not what their browser history would have them believe is there.

If I'm barking up the right tree get back and I'll point you in the right direction.



  Taran 15:02 08 Dec 2003

Actually, thinking about it, you could include a JavaScript instruction in the hyperlink to refesh the target framepage it is supposed to load up using an onClick event along the lines of onClick=";".

This can be a little buggy for Netscape users though and is not ideal.

  smartdave 15:03 08 Dec 2003

Their browsers may have cached the old images.

  smartdave 15:20 08 Dec 2003

Since there are many different pictures being displayed in the third frame, it would be best if I could put code in that affects the whole page, rather than adding code to each <a href.

  Taran 15:36 08 Dec 2003

That's not how it works with frames.

You can tell a hyperlink to open a target frame (and refresh it in the process) or you can target a specific file name (pagename.htm or similar) which will be refreshed on point of load.

You are talking about something a bit more global though.

Which web authoring software application are you using ?

The reason I ask is in most good authoring programs, if you change the name of a file the links leading to it from other pages will be automatically updated.

Let's say your visitors have a cache of mainpage1.htm and its image. If you rename it to mainpage2, it is a new document with no relation to the old one as far as a browser is concerned and so should be loaded as a new file along with the replacement image you put on it when you renamed it.

Dreamweaver, FrontPage and similar all have that feature where if you right click and select Rename, you get a prompt whether or not to update the links to that file.

It could be a quick and easy answer but depends on your software.

Frames are always a headache for this (and other) tasks which is one of many reasons why I avoid them like the plague.

Get back to me with your software type and we'll go from there.


  smartdave 15:44 08 Dec 2003

I used "Notepad", saved the page as extension txt and renamed to html. Isn't that what all programmers do?

the website is click here

Every week I upload new results as a jpeg, overwriting a default picture. Up until now I have had trouble confirming the new picture (results sheet) has been uploaded successfully. Now I can CTRL F5, to check it myself (thanks), but visitors may wait indefinately for the results.

  Taran 16:31 08 Dec 2003

"Isn't that what all programmers do"

No, it isn't, and since you did not supply the information I had to ask to try and offer a suitable fix.

If you used a web authoring program (most designers do to speed up development) you could have used the methods outlined above to rejig your files quickly easily and effectively.

I can't think of a quick solution offhand that does not entail JavaScript embedding into the target document itself or into every hyperlink, which you say you don't want to do.

I'll have a think or perhaps someone else has a simple solution off the peg that may be used. Without amending filenames, target of hyperlinks or similar I can't think of anything offhand that would work the way you want it to.

  smartdave 16:57 08 Dec 2003

I thought I had supplied the information. I have not used a specific program. If necessary I will put this Onclick line in all hrefs (onClick=";". ) Presumably part of this line I have to replace with my specific info?

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

iMac Pro review

See iconic duo Smith and Foulkes' epic animation for the BBC's Winter Olympics coverage

iMac Pro review

Idées cadeaux pour geeks et tech addicts