I am parsing a csv file that's on the server:
var readCSV = function(url){
Papa.parse(url, {
download: true,
header: true,
plete: function(results) {
listen = results.data;
}
});
}
Unfortunately still reads an old file from cache even though I have already replaced it on the server. Is there some way to prevent it from using the cache?
I am parsing a csv file that's on the server:
var readCSV = function(url){
Papa.parse(url, {
download: true,
header: true,
plete: function(results) {
listen = results.data;
}
});
}
Unfortunately still reads an old file from cache even though I have already replaced it on the server. Is there some way to prevent it from using the cache?
Share Improve this question asked Dec 29, 2017 at 8:46 ChrisChris 14.3k24 gold badges94 silver badges184 bronze badges1 Answer
Reset to default 10You could use a cachebuster to read your new file. So your URL should look like.
var readCSV = function(url){
Papa.parse(url+"?_="+ (new Date).getTime(), {
download: true,
header: true,
plete: function(results) {
listen = results.data;
}
});
}