Page 1 of 1
Caching Problem
Posted: Fri Feb 12, 2016 9:41 am
by peda
1. We use JS version and when we change a Report and reopen the report its load a old version from the Report.
The file is saved correct. But on reopen he uses the old version of the Report.
I think its a caching Problem. The Problem is only on Google Chrome
Thanks Peter
Re: Caching Problem
Posted: Sun Feb 14, 2016 7:34 am
by Jan
Hello, Peter!
We made some test, but we cannot reproduce this problem now. I have the question. If you save your report file with the new name it loads correctly?
Thank you.
Re: Caching Problem
Posted: Mon Feb 15, 2016 9:02 am
by peda
Yes when i save with a new name it work correctly. It also works better with Internet Explorer as in Chrome
Re: Caching Problem
Posted: Tue Feb 16, 2016 7:13 am
by Andrew
Hello,
One more question. What web server are you using?
Waiting for your reply.
Thank you.
Re: Caching Problem
Posted: Tue Feb 16, 2016 9:24 am
by peda
On my testsystem i use Xampp (Apache) and on LiveSystem i use an Apache on ubuntu Linux
Thanks Peter
Re: Caching Problem
Posted: Wed Feb 17, 2016 12:21 pm
by Andrew
Hello,
Could you, please explain how do you save/load the report template?
Waiting for your reply.
Thank you.
Re: Caching Problem
Posted: Wed Feb 17, 2016 7:12 pm
by peda
Hello Thanks
I save the Report in a Json String and in php i save it to the file
Thanks Peter
Load
report.loadFile(reportfile);
save file
var jsonstring = designer.report.saveToJsonString();
$.post("index.php?controller=pjAdminReports&action=pjActionSaveReport", {
reportfile: reportfile,
reportjson: jsonstring
}).done(function (data) {
// alert (data);
if (data.status == 'OK') {
// designer.close();
dialog.close();
}
});
public function pjActionSaveReport()
{
$this->setAjax(true);
if ($this->isAdmin()){
if (isset($_POST['reportfile'])){
file_put_contents($_POST['reportfile'], $_POST['reportjson']);
pjAppController::jsonResponse(array('status' => 'OK', 'code' => 200, 'text' => 'Reports erfolgreich gespeichert'));
} else
{
pjAppController::jsonResponse(array('status' => 'ERROR', 'code' => 100, 'text' => 'Reports nicht gefunden'));
}
}
}
Re: Caching Problem
Posted: Thu Feb 18, 2016 5:58 am
by Vladimir
Hello,
Please try to use the random parameter in report URL to avoid the problem with browser cache:
Code: Select all
var n = Stimulsoft.System.Guid.newGuid().toString().substr(0, 8);
report.loadFile(reportfile + "?n=" + n);
Thank you.
Re: Caching Problem
Posted: Fri Feb 19, 2016 7:13 am
by peda
Thanks,
Now it works
regards Peter
Re: Caching Problem
Posted: Fri Feb 19, 2016 12:22 pm
by HighAley
Hello, Peter.
We are always glad to help you.
Let us know if you need our help.
Thank you.