I was just about to suggest that some of Gwyn Evans' headers were set by
wicket.
I found the setHeaders(...) method in WebResource that sets a couple of
headers when/if it is not cacheable. Which headers are set if it is
cacheable, and where is that done? (I don't find my way around the
wicket framework.)
/Anders
Johan Compagner wrote:
if you set cacheable to false then it should work for you out of the box
because then no caching is set and the lastmodified time is set to -1
The most browsers shouldn't cache it at all.
The problem you had is that when it is enabled then we are setting some
default caching headers
and we set the last modified time.
for our DynamicByteArrayResource i have made it non cacheable by default
now. I guess this is a better default.
johan
On 3/1/06, Anders Peterson <[EMAIL PROTECTED]> wrote:
1) "setCacheable": Done! With dynamic images it seems like a good idea
to have this set to false by default.
2) "random number as a query parameter": I had thought about giving the
images different names with each request, but I didn't know (still
don't) how to do that. The generated html looks like this:
<tr><td scope="col"><img width="600" height="300" wicket:id="image2"
src="/BLApp/app?path=3:image2&interface=IResourceListener"/></td></tr>
I'll look for documentation on how to do this...
3) "Set the headers on the response": You mean some header that tells
the browser(s) not to cache the page - is there a standard for that? I
have no idea which browsers will be used, and I want the app to work
with any browser.
Thanks, /Anders
Anders Peterson wrote:
Hi,
On one page I'm displaying dynamic charts (JFreeChart) as images. The
charts, the data they're based on, are constantly changed by the users.
The problem (as I understand it): The web browser doesn't know that the
image has changed and therefore (sometimes) uses a cached image. Which
means incorrect data is displayed.
How can I make sure the browser always asks for a fresh image?
/Anders
Image tmpImage2 = new Image("image2", new SpclChartResource() {
public AbstractChartFactory getFactory() {
this.setHeight(300);
this.setWidth(600);
DefaultCategoryDatasetFactory retVal = new
DefaultCategoryDatasetFactory();
retVal.setLegend(true);
retVal.setType(AbstractChartFactory.TYPE_BarChart);
...
--
http://ojalgo.org/
Mathematics, Linear Algebra and Optimisation with Java
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
--
http://ojalgo.org/
Mathematics, Linear Algebra and Optimisation with Java
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user