viewer with xml data file - refresh problem

Stimulsoft Reports.PHP discussion
Post Reply
JasonMaude
Posts: 6
Joined: Fri Aug 02, 2019 4:14 pm

viewer with xml data file - refresh problem

Post by JasonMaude »

Hi,
something strange happens to me:
I build my report and then I publish the report to be able to open the viewer in my php application.
Then I unzip the file and and install the viewer, where I change the path to a specific local directory.
When I want to update the data, I simply replace the xml data file.
so far so good.

The problem that I have is that, when I replace the data file with a new data file, I need to run the viewer twice before I see the new data file content in the viewer. The first time that I run the viewer will show the content of the old file that does no longer exist (because it has been overwritten with the new data file).
It is like if the file is cached the first time I try.
Anyone could tell me how to solve this?
many many thanks!
Jason
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: viewer with xml data file - refresh problem

Post by Lech Kulikowski »

Hello,

Most likely, it is the browser cache, you should either use the HMTL page metatags to disable browser caching,
or generate a unique link when replacing the XML file - this will also get rid of the cache, e.g:
/files/data.xml?rnd=1234567890

Thank you.
Post Reply