how to prevent image cache in jsp

Discussions

Web tier: servlets, JSP, Web frameworks: how to prevent image cache in jsp

  1. how to prevent image cache in jsp (2 messages)

    hi everyone , actually i am using servlets & jsp.When first user logins the servlet is forward to jsp & the image is properly displayed ,but when second user logs in the first user image is displayed . I also tired response.setHeader( "Pragma", "no-cache" ); response.setHeader( "Cache-Control", "no-cache" ); response.setDateHeader( "Expires", 0 ); the image is not expired .Please help me out guys .thanks in advance
  2. in fact, the only reliable way to do it is to add some random text to the image url and regenerate it each time, because some browsers will ignore all the headers you set.
  3. How Can I generate Random Text[ Go to top ]

    in fact, the only reliable way to do it is to add some random text to the image url and regenerate it each time, because some browsers will ignore all the headers you set.

    Hello

     

    Please Explain your way to generate the way of random text in the URL