Results 1 to 5 of 5

Thread: Cache that Image

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    How Can I Tell A Client to cache an image from a web page. i.e. don't keep downloading that image even when the page refreshes, or is this a client side thing where some browser do or don't.
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Its pretty much up to the browser to determine when to get it from the cache and when to pull it over the wire again. You can add some META tags to the header of your page to cache the entire page, but I don't know of anything that can do this just for the images (but I think it's automatic anyways....)

    hope this helps

  3. #3
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    If you're running IIS, I believe you can set the "Expires" property for each file in your web site through the IIS manager.

    Josh

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    The Server is apache.

    its for a school closings page for a TV station, the page has 1 small image on it but that still slows things down when you are talking about 50,000 hits in 3 hours on a server that usually get 25,000 hits all day.

    Any ideas the best why to handle an almost static page that is being hit so hard compared with the rest of the site?
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  5. #5
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    I guess, instead of serving the image, make a CGI script that sends the Expires/ Cache Control HTTP header, the content-type header, then the image converted to the MIME code or whatever. Then you should be able to manually set the "Expiration Date" to whatever you want.

    Unless Apache has a similar feature like IIS does built into it.

    Josh - Gonna build a Linux box with Apache/Perl/PHP/MySQL real soon...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width