I'm working on a new theme for my site and the background image is 1.3mb and I was wondering of there is anyway to cache that so load times are a bit faster. Would it help if the fonts were cached as well? Not sure if this is an other or php discussion.
First of all, there is absolutely no way your background image should be 1.3mb. No way at all.
Having said that, here is a way using .htaccess to cache images:
# cache images and flash content for one month <FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf)$"> Header set Cache-Control "max-age=2592000" </FilesMatch>
But let me reiterate, there is no way your image should be 1.3mb.
Having said that, here is a way using .htaccess to cache images:
But let me reiterate, there is no way your image should be 1.3mb.