d3 Caching Issue

18 views
Skip to first unread message

Gregory Sloggett

unread,
Mar 8, 2018, 9:07:03 AM3/8/18
to d3-js
Hi, 

I'm trying to do a simple CSV bar chart, which takes in user input, writes it to the CSV file, and updates the graph on my webpage. 

The issue I'm having is cache related, as the graph doesn't update when the user submits there details, even though the CSV file has been updated. When I clear the cache on my browser, the graph is then updated. I would like to prevent this hassle for the users experience.

I'm developing in Python-Flask, and the issue has been on most browsers. Any suggestions?

Thanks in advance, 

Greg.

Ibrahim Tanyalcin

unread,
Mar 8, 2018, 9:53:43 AM3/8/18
to d3...@googlegroups.com
Some options

- append a question mark + random number (?12312414) to the requested CSV url. 
- send proper cache control headers
- if you are on apache update the main config or modify htaccess

--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gregory Sloggett

unread,
Mar 13, 2018, 1:14:31 PM3/13/18
to d3-js
The random number worked perfectly for me, thanks Ibrahim!
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages