Hi,
this is a common problem. The browser tries to cache data as much as
possible. But this is not always feasible. Especially while development
it is quite annoying when changes in js is not reloaded. You have to
tell the browser, which resources not to cache.
Note that POST request are not cached while GET requests are. So I would
recommend to send ajax requests via POST.
Another option is to put this into the component:
reply.setHeader(tnt::httpheader::cacheControl, "no-cache");
You may want to write a component e.g. "nocache" with this content:
<%cpp>
reply.setHeader(tnt::httpheader::cacheControl, "no-cache");
return DECLINED;
</%cpp>
And call that in your mappings before your resources, which should not
be cached. It just sets the header and continues processing in the mappings.
Tommi
Am 06.02.2016 um 01:22 schrieb Raphael Fuchs:
Hi all,
I am working with tntnet and found some strange behaviour.
The following javascript code works when loading the
var img = new Image();
img.src = 'bilder/terrain_2.gif';
var canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
canvas.getContext('2d').drawImage(img, 0, 0, img.width, img.height);
The problem might be that tntnet does not send the image again:
2016-02-06 01:15:07.49702 [26302.140073553266432] INFO tntnet.worker -
request GET /bilder/terrain_2.gif ready, returncode 304 Not Modified -
ContentSize: 0
Is there a simple way to make tntnet send the picture?
Cheers,
Raphael
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general