Frames in web page refreshing

  smartdave 01:23 07 Dec 03
Locked

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 03

Press & Hold CTRL + F5

  smartdave 14:38 08 Dec 03

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.

Thanks

  Taran 14:51 08 Dec 03

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.

Regards

Taran

  Taran 15:02 08 Dec 03

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="frame.name.window.location.reload(true);".

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

  smartdave 15:03 08 Dec 03

Their browsers may have cached the old images.

  smartdave 15:20 08 Dec 03

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 03

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.

T

  smartdave 15:44 08 Dec 03

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 03

"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 03

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="frame.name.window.location.reload(true);". ) Presumably part of this line I have to replace with my specific info?

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

Best phone camera 2016/2017: Galaxy S7 vs iPhone 7 vs Google Pixel vs HTC 10 Evo vs OnePlus 3T vs…

1995-2015: How technology has changed the world in 20 years

These are the Best Christmas Ads and Studio Projects of 2016

Super Mario Run preview | Hands-on first impressions of Super Mario Run: Mario's iPhone & iPad…