I have picked up a problem with the uploading of files. ...
I have uploaded file XXXX and provided it as a resource. Then I update file XXXX on my PC, delete it from the moodle server and upload the new version and link it to the resource.
BUT!
The file that is given as resource is the old one, not the updated one.
Any ideas?
The old resource is still cached in your browser. The browser will not get a new copy until the lifetime of the old one has expired. The lifetime is set in line 8 of cvs:/moodle/file.php. It is currently
$lifetime = 86400;
which is the number of seconds in a day. Because of many complaints from lecturers similar to yours I have changed that in our installation by placing the lines
// only jpeg files get a long lifetime (so that userimages are not requested too often),
// everything else should be checked after 10 seconds
if ($mimetype <> 'jpeg') {
$lifetime = 10;
}
right after line 40 which reads
$mimetype = mimeinfo("type", $filename);
I propose this as a general change in Moodle, however of course with the 10 replaced by something like $CFG->lifetime.
Until such a time there is the advice from Martin somewhere in these forums: simply change the name each time you change a file.
To kick your own browser and force it to get a fresh copy just hold down "shift" while pressing the reload/refresh button.
>To kick your own browser and force it to get a fresh copy just hold down "shift" while pressing the reload/refresh button.
If you are using IE, you want to press <ctrl><F5> to force a refresh (the <shift> does not do anything). This is usually the quick solution to your problem, as Martin pointed it out.
DG
Hi Martin!
As you know I am a newbie. The reason I suggested the solution I did is I use to have a site on a free f2s.net site. Sometimes even after a F5 refresh the updated file would not show and a webmaster might have to wait several hours to a day for the f2s servers cache to be cleared out. This did not happen all the time but it did happen enough to be annoying.
For my own edification, what do you mean when you say "There is no such thing when it comes to Moodle resources".
WP1