Forum Moderators: phranque

Message Too Old, No Replies

File caching problem

         

StoutFiles

12:48 pm on Jun 7, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a .csv file with one line of data. I have a link to the .csv file, report.csv, that opens the file.

I have another page on my site that appends another line to report.csv. However, when I click to see the new result, report.csv still has one line of data. If I go into the server and pull the file out it has two lines of data like it should.

I believe the file is being cached. I've added

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<meta http-equiv="pragma" content="no-cache" />

to the top. I've tried deleting the file and adding all the new data at once instead of appending the extra line of data. Any idea how I can stop the site from bringing up the old file?

StoutFiles

1:18 pm on Jun 7, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Note: This is only happening in Firefox, not IE.

phranque

5:24 am on Jun 8, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



the user agent will not process a http-equiv meta element tag in a csv file - in that context it is nothing more than a line of text.
you need to have the server provide that information as a HTTP response header.

for testing purposes you should be able to clear your browser cache and/or use shift/refresh to force reloading of the requested resource(s).