Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
I want to cache my jpg files
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- I want to cache my jpg files
I want to cache my jpg files
02-06-2015 5:01 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
PageSpeed /google is unhappy I'm not caching my jpg's and .css files.
I have used Sitemap to tell google about my normal htm files being are good for a day,(<changefreq>daily</changefreq>), how do I do the same for images & css?
What does plusnet support? Do I just put a file in htdocs ? Like htaccess ? to put a http header?
I just want them max-age=86400 e.g. a day.
I have used Sitemap to tell google about my normal htm files being are good for a day,(<changefreq>daily</changefreq>), how do I do the same for images & css?
What does plusnet support? Do I just put a file in htdocs ? Like htaccess ? to put a http header?
I just want them max-age=86400 e.g. a day.
Message 1 of 6
(2,574 Views)
5 REPLIES 5
Re: I want to cache my jpg files
02-06-2015 5:23 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Try putting something like this into an .htaccess and upload it to your /htdocs folder:
ExpiresActive On
ExpiresByType image/jpg "access plus 1 day"
ExpiresByType image/jpeg "access plus 1 day"
ExpiresByType image/gif "access plus 1 day"
ExpiresByType image/png "access plus 1 day"
ExpiresByType text/css "access plus 1 day"
Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵
Message 2 of 6
(478 Views)
Re: I want to cache my jpg files
03-06-2015 12:35 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks bob
I now got this
Leverage browser caching
Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
Leverage browser caching for the following cacheable resources:
http://www.google-analytics.com/ga.js (2 hours)
http://www.shastonjazzandswing.co.uk/images/sjs_780x580.jpg (24 hours)
http://www.shastonjazzandswing.co.uk/pictures/pink_babs.jpg (24 hours)
http://www.shastonjazzandswing.co.uk/pictures/yellow_babs.jpg (24 hours)
http://www.shastonjazzandswing.co.uk/sjs_layout_mobile.css (24 hours)
http://www.shastonjazzandswing.co.uk/sjs_layout_monitor.css (24 hours)
http://www.shastonjazzandswing.co.uk/sjs_layout_printer.css (24 hours)
So it's seen the day part, but its still not happy, any ideas?
I now got this
Leverage browser caching
Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
Leverage browser caching for the following cacheable resources:
http://www.google-analytics.com/ga.js (2 hours)
http://www.shastonjazzandswing.co.uk/images/sjs_780x580.jpg (24 hours)
http://www.shastonjazzandswing.co.uk/pictures/pink_babs.jpg (24 hours)
http://www.shastonjazzandswing.co.uk/pictures/yellow_babs.jpg (24 hours)
http://www.shastonjazzandswing.co.uk/sjs_layout_mobile.css (24 hours)
http://www.shastonjazzandswing.co.uk/sjs_layout_monitor.css (24 hours)
http://www.shastonjazzandswing.co.uk/sjs_layout_printer.css (24 hours)
So it's seen the day part, but its still not happy, any ideas?
Message 3 of 6
(478 Views)
Re: I want to cache my jpg files
03-06-2015 1:34 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Not sure TBH, something like this maybe?
Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵
Message 4 of 6
(478 Views)
Re: I want to cache my jpg files
03-06-2015 4:17 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Do the messages simply mean a longer expiry time is recommended (eg 1 week or 1 month)?
David
David
David
Message 5 of 6
(478 Views)
Re: I want to cache my jpg files
03-06-2015 8:58 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks, looking again at PageSpeed I think you might be right.
Leverage Browser Caching
This rule triggers when PageSpeed Insights detects that the response from your server does not include caching headers or if the resources are specified to be cached for only a short time.
...
We recommend a minimum cache time of one week and preferably up to one year for static assets, or assets that change infrequently.
...
I changed .htaccess to
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
to test this theory, it removed images from my list, it just complains about my css files.
Thank you both for your advice, I will tweak expires on css, when stable. Thanks again
Leverage Browser Caching
This rule triggers when PageSpeed Insights detects that the response from your server does not include caching headers or if the resources are specified to be cached for only a short time.
...
We recommend a minimum cache time of one week and preferably up to one year for static assets, or assets that change infrequently.
...
I changed .htaccess to
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
to test this theory, it removed images from my list, it just complains about my css files.
Thank you both for your advice, I will tweak expires on css, when stable. Thanks again

Message 6 of 6
(478 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- I want to cache my jpg files