A
A
Alexey selftrips.ru2017-03-29 18:11:00
CDN
Alexey selftrips.ru, 2017-03-29 18:11:00

Caching images from third-party resources?

I render image with code like this

<img src="https://maps.googleapis.com/maps/api/staticmap?markers=россия&size=1470x250&scale=2&maptype=roadmap" width="100%" />

1. Will this image be cached by the wp super cache plugin?
2. Will cloudflare be cached?
3. In general, how can you understand whether a picture is cached or not?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasya Petrov, 2017-03-29
@VasyaPertrov

1. no.
2. brrr...
3. it's not your problem.
Don't worry about it, work on YOUR website.

S
Svetlana, 2017-03-30
@Esmi

1. No, because this image is served from the maps.googleapis.com subdomain. Caching settings depend only on the server from which the files are served.
2. No, see point 1.
3. You can view it in the terminal using the command: curl -I link or open the picture in the browser, press F12, the Network tab, then F5, click on the file in this window and look for one of the HTTP headers : Cache-control , X-Age and X-Cache .
The cache-control must be public and max-age (indicates the time in seconds for which the file will be cached). If there is private or no-cache, then the file will not be cached.
In x-age , how long is the file in the cache.
ATx-cache is written 2 values ​​MISS or HIT. MISS - the file was not cached on the server, HIT - the file was returned from the cache.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question