From: Albert Schlef Date: 2009-01-19T19:57:23+09:00 Subject: Re: How to refresh Image through ajax request Kumar Saurav wrote: > Albert Schlef wrote: >> Kumar Saurav wrote: >> [...] >>> render :text => "" >> >> Perhaps the browser caches this image. The browser isn't aware that it >> has changed. I suggest you add some random string to the image's URL. >> E.g. /image/xyz.jpg?56543653. > > Hi i just hard code the path like "public/images/xyz.jpg?1234" but after > that i get the following error > > no encode delegate for this image format `public/images/xyz.jpg?1234' You added that random string in img_rev.write(). No good. Add it to the URL. In other words, add it in the tag. You need to send the browser '' instead of just ''. -- Posted via http://www.ruby-forum.com/.