This question about Issue in browser: More info required

Attachment link opens old version

Hi,

When attaching a new version of a document to a topic, the link to the document, in the attachment table, or in the text, opens the previous version of the file. This applies no matter how many versions there are, for example, if the 4th version had been uploaded, the link would now open the third version.

Any ideas?

Many thanks

Susan

-- SusanManoy - 15 Jan 2013

Is your site configured using the Foswiki Page Cache? (Check the setting of {Cache}{Enabled} in your LocalSite.cfg.)

Thinking about this further, what does the link to the attachment look like?
  • Does it use the bin/viewfile script?
  • Does it include a rev= or some version indicator
I think this is somehow a caching issue, in that the topics typically don't point to specific revisions of attachments. It normally depends upon the web server just sending the latest version of the file. So the more I think about it, I doubt that it's a Page Cache issue, but more likely browser caching.

-- GeorgeClark - 15 Jan 2013

Thanks for your help. It seems to be working fine today, so is definately a caching issue somewhere. Will look into it.

-- SusanManoy - 16 Jan 2013

Having investigated further this only happens when I have multiple tabs open on the same wiki (I am using IE). I am uploading and trying to view the file in the same tab, and the old version is displayed. I have tried clicking "Refresh" but this doesn't solve the problem. If I close and reopen IE then it will view the latest version. I am not familiar with caching. Would this make it a Page cache or brower cache issue? I have read that there are some issues with the PageCache in 1.1.x, so should we disable page caching? Thanks again.

-- SusanManoy - 16 Jan 2013

The Page Cache is disabled by default, so unless your site has enabled it, you don't need to do anything. I suspect this is definitely more browser related though, and has nothing to do with the page cache.

You might also check your web server configuration. Do you have it configured to send expires tags? If your attachments are being sent with an expires tag, it instructs the browser not to fetch a new version until the time expires. For example the below causes the browser to cache common image, css and javascript files for 17 days.

     <filesmatch "\.(jpe?g|gif|png|css(\.gz)?|js(\.gz)?|ico)$">
          ExpiresActive on
          ExpiresDefault "access plus 17 days"
      </filesmatch>

-- GeorgeClark - 16 Jan 2013
 

QuestionForm edit

Subject Issue in browser
Extension
Version Foswiki 1.1.5
Status More info required
Related Topics
Topic revision: r4 - 16 Jan 2013, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy