2 Replies Latest reply on Dec 14, 2004 4:10 AM by anyone

    Force static images to be cached in browser

    anyone

      I have a Problem with static images in a servlet.

      The images are stored with the servlet in a simple war-archive are heavily referenced in the pages generated by the servlet (up to 200 images per page, the average user reloads this page about every 10 seconds).

      These images normally never change, but some browsers (particularly ie) reload every single image on each page refresh. (whereas firefox and opera are smart enough to fetch these images from cache)

      Is there any way to attach a information on these images that they must not be refetched, without writing an servlet and manually set an "Cache-Control" or "Pragma"-Header?

      Thanks a lot,
      -Marc-