Make random URLs for the image. You can do that simply adding dummy parameters, like /image.ext?foo=bar1, bar2, bar3... etc. The browser cache resources per URL.

I think this will work.

See ya

On 5/7/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
well, if the browser ignores that then you should change the url.

-Igor



On 5/7/06, Potje rode kool < [EMAIL PROTECTED]> wrote:
Yes, its a caching problem, when I disable caching in Firefox (doing this with the web developer toolbar) it works fine.
How do I add those headers for the images I want to disable caching for.  I tried to set some headers on my WebResource subclass
I use like this:

        response.setDateHeader("Expires", System.currentTimeMillis());
        response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0");

But that doesn't seems to work.

Thanks in advance,
Evert


2006/5/7, Igor Vaynberg < [EMAIL PROTECTED]>:
are you updating img's src attribute in the ajax call? or is the image streamed from somewhere and reflects a property you changed with ajax?

the first should work

the lettter might not unless the url changes - because the browser would have the cached version and no reason to reload it. so you either have to update the url and add a &rand=randomnumber parameter to force the browser to reload the image or add no-cache no-store headers when you are streaming the image.

-Igor



On 5/6/06, Potje rode kool <[EMAIL PROTECTED]> wrote:
Hi,

I am trying to change an image after an AjaxLink is clicked but I can't get it working.
The images are on a Panel, when I click on the AjaxLink I create a new Panel and replace the old one (by calling getPage().replace(Component) ).
I also have put an Label on the Panel and the Label gets updated when I click on the AjaxLink, but not the images.

Do I have to do something extra to let images update or does Wicket doesn't support updating images by Ajax?

Thanks in advance.
Evert







--
Bruno Borges
[EMAIL PROTECTED]
Sun Certified Java Programmer for 1.4
Sun Certified Web Component Developer for 1.4

Reply via email to