ajax loaded content not cached

Created on 22 March 2017, about 8 years ago
Updated 13 May 2025, 1 day ago

I tweaked boost to cache the different content types I need: jpeg, png, gif, pdf and swf.
This works when the files are directly linked in pages.
However, it fails when trigged by ajax. The header only see the JSON code, not the called content.
See for example this page https://www.see.asso.fr/fichier/18857_energie-nucleaire-solution-avenir-....
The swf preview and other image format are not catched.
below the headers for the swf preview:

https://www.see.asso.fr/file_preview/file_video_flash_swf/b4413a3190fd4255afc376c717783717a1756a09/31896
POST /file_preview/file_video_flash_swf/b4413a3190fd4255afc376c717783717a1756a09/31896 HTTP/1.1
Host: www.see.asso.fr
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Accept: application/json, text/javascript, */*
Accept-Language: fr,en;q=0.8,fr-FR;q=0.5,en-US;q=0.3
Accept-Encoding: gzip, deflate, br
X-Requested-With: XMLHttpRequest
Referer: https://www.see.asso.fr/fichier/18857_energie-nucleaire-solution-avenir-durable-bas-carbone
Content-Length: 0
Content-Type: text/plain;charset=UTF-8
Cookie: _ga=GA1.3.2035831487.1489742437; has_js=1; SESS49d6a4b14bb30beb24db03b809981c0d=c5cc760eb5602abec50f93cc25628e2b; _gat=1
Connection: keep-alive

HTTP/1.1 200 OK
Date: Wed, 22 Mar 2017 13:17:59 GMT
Server: Apache/2.2.22
Strict-Transport-Security: max-age=15768000
X-Powered-By: PHP/5.3.10-1ubuntu3.26
Last-Modified: Wed, 22 Mar 2017 13:17:59 +0000
Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0
Etag: "1490188679"
Content-Location: https://www.see.asso.fr/file_preview/file_video_flash_swf/b4413a3190fd4255afc376c717783717a1756a09/31896
Content-Length: 1057
Keep-Alive: timeout=5, max=500
Connection: Keep-Alive
Content-Type: application/json

Thanks for help

💬 Support request
Status

Fixed

Version

1.0

Component

Caching logic

Created by

🇫🇷France jvieille

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany c-logemann Frankfurt/M, Germany

    In 8+ version we there can be change to also cache ajax calls. But for everything we need someone to realize. Closing the issie for now.

Production build 0.71.5 2024