Avatar of ullfindsmit
ullfindsmit
Flag for United States of America asked on

HTML Cache External Images Only

In process of trying to optimize http://www.dealer24x7.com/Used/1/Inventory/ the recommendation we are getting from google's page speed insights (https://developers.google.com/speed/pagespeed/insights) is to leverage caching.

What meta tag do we need to use to specify caching images (local and external) longer (say 3 months) and caching the HTML of the page for only a week?


p.s.
The goal is to leverage public cache pools by using
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="PUBLIC">
HTML

Avatar of undefined
Last Comment
James Williams

8/22/2022 - Mon
James Williams

It's not a META tag.

Its a server Issue  or setting

If you use IIS

http://www.iis.net/learn/manage/managing-performance-settings/configure-iis-7-output-caching

Selvol
ullfindsmit

ASKER
Unfortunately some (or even a good majority) of the images come from third party servers that I have no control over
Dave Baldwin

Image files don't have META tags or any other HTML in them.  That would have to be done on the server.  Here's a page about doing in Apache:  http://www.chicagostyleseo.com/2010/04/googles-need-for-speed-use-cache-and-htaccess-to-speed-up-your-site/  I don't know how to set this up in IIS.  I that in the other comment.

If they're from third party servers, there is nothing you can do about it.
Your help has saved me hundreds of hours of internet surfing.
fblack61
ullfindsmit

ASKER
So is there an HTML tag on the HTML page that I can use to say cache this page and its contents (local and external images) for 7 days?
Dave Baldwin

No.
ASKER CERTIFIED SOLUTION
James Williams

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ullfindsmit

ASKER
While it aint pretty, it does the job
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
James Williams

Glad You appreciate that script....

Who needs pretty, when your sneaky.

You could Save the external image to a local FOlder.
 Add a Check to see if the File exists before the PHP
gets the external Image.



Regards Selvol