How to force new chart when using HTML Post

10 views
Skip to first unread message

Rob

unread,
Jun 1, 2010, 10:59:18 AM6/1/10
to Google Chart API
I have two situations: in one situation my URL is under the 2,048 URL
character limit and I can do a normal HTTP GET to retrieve a Google
Chart image. In the other situation my URL is greater than 2,048
characters so I have to instead display an HTML form and do an HTTP
POST that redirects the resulting Google Chart image to an iframe. All
of this works except for one small issue: when I do the HTTP POST
method, the chart returned is always the same, so either the same
image is being returned or my browser is showing a cached image
instead of showing the new image. How do I force both Google Charts
AND my browser to not show any cached images and instead show a
"fresh" image each time I use the HTTP POST method described above?

Thanks in advance,
Rob

Rob

unread,
Jun 1, 2010, 11:46:37 AM6/1/10
to Google Chart API
I seemed to have solved my own problem. The action of my form was
http://chart.apis.google.com/chart as shown in the examples of the
Google Charts API. I changed it to this: http://chart.apis.google.com/chart?millis=<millis>
where <millis> is the current time stamp in milliseconds. The problem
instantly went away.
Reply all
Reply to author
Forward
0 new messages