andreamarucci wrote:Below you'll see the graph of my forum's CDN
Keep in mind one big difference. Your forum should reach 100% caching once all pages are visited once.
In X3 on the other hand, any grid layout page in X3, will serve an image depending on the screen size (decides how the grid breaks), retina and non-retina. Therefore, you could have NEW image requests way into the future when an irregular devices visits a page.
I'm not saying that is the reason, but Im just making you aware of some clear differences.
andreamarucci wrote:There's something other I can do or I can check in IV?
Let me make an example. Here is an image inside X3 content:
http://1041320869.rsc.cdn77.org/content ... 1201/2.jpg
Here are the headers from your CDN for this image:
Date: Thu, 05 May 2016 14:26:50 GMT
Content-Type: image/jpeg
Content-Length: 115178
[b]Last-Modified: Mon, 13 Apr 2015 11:23:38 GMT[/b]
[b]Cache-Control: max-age=315360000[/b]
[b]Expires: Sun, 03 May 2026 14:25:10 GMT[/b]
Server: CDN77-Turbo
X-Edge-IP: 46.234.127.81
[b]X-Edge-Location: bratislavaSK
X-Cache: HIT[/b]
X-Age: 100
Accept-Ranges: bytes
Connection: keep-alive
Your original image, where the CDN pulls from, and inherits headers (unless overridden in your cdn77 settings):
http://gallery.kog.it/content/2.2001200 ... 1201/2.jpg
First of all, the X3 application doesn't "serve" that image. It's just requested from the server. You could DELETE the entire X3 application (except this image), and the image would still be exactly the same, with exactly the same headers (try if you want ...). Therefore, I am not sure how anyone can claim this has anything to do with X3.
See headers for the original image:
Date: Thu, 05 May 2016 14:30:19 GMT
Server: Apache
[b]Last-Modified: Mon, 13 Apr 2015 11:23:38 GMT[/b]
Accept-Ranges: bytes
Content-Length: 115178
[b]Cache-Control: max-age=315360000[/b]
[b]Expires: Sun, 03 May 2026 14:30:19 GMT[/b]
Content-Type: image/jpeg
Connection: keep-alive
As you can see, the "expires" headers are clearly set, and correctly inherited into your CDN headers. Basically your CDN gets that image, and should base its caching on the "expires" date
Expires: Sun, 03 May 2026 14:30:19 GMT ... This header is pretty clear, no? If your CDN has to re-request the image from origin prior to this date, then you need to ask the CDN provider.
I can only imagine this possible scenario: Ok so you have 1000s of images right? ... and then each image comes in 5-6 sizes that might be requested over time (based on devices and screens)? ... and then each of these images will steadily be "pulled" to the CDN network edge locations, based on when a visitor makes the request from a specific location? This means that it will take ages for ALL your images to successfully cache to ALL edge locations, as all images, need to get requested in all sizes from all locations.
To be honest, I am not 100% sure about the above, Im just trying to come up with a possible explanation. In either case, this is not X3's doing .. especially unless the experts at CDN77 can point out what's wrong.
How can I be so sure? Because apart from the htaccess which sets headers, X3 doesn't (and can't) do anything to the image. The image headers are entirely correct, as you can see for yourself, and as CDN77 will have to admit also. You could delete the X3 app, and images/headers would be the same. Furthermore, once an image gets cached at CDN77, it should never get requested again from your server (x3), until 10 years later, as are clearly defined in the response headers ... So why does cdn77 re-request the image? Only they can answer that.