Forum Moderators: phranque

Message Too Old, No Replies

Forcing image caching on SSL sites

How do I force images to be cached on sites using SSL

         

PumpkinHead

1:24 pm on Oct 13, 2005 (gmt 0)

10+ Year Member



Hi all,

I'm amending an old site (that I didn't design!) that has a large graphical banner in the header of each page.

I've received complaints from dial-up visitors who say that the site is very slow. Unfortunately, the whole site is SSL secured and for now, we are unable to do anything about this.

I've just found out the reason why everything is so damn slow....SSL pages don't cache images - so every time a new page is displayed, the images have to be downloaded again...including the large header image.

Obviously, each page is also encrypted but this doesn't seem to have a massive impact.

So my question is pretty simple, how can I force the browser(s) to cache images. I'm not so sure the reply will be quite so simple...

Thanks in advance

PumpkinHead :)

Dijkgraaf

9:51 pm on Oct 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You won't be able to force it to cache under SSL.
You could have the images come from a non SSL location e.g. <IMG src="http://www.example.com/image.jpg">, however then the user might get warnings about there being non SSL contents on the page.
I would concentrate on optomising or changing the graphical banner so that it has a smaller file size.