JSON should not be considered “Media & Other”
-
In the Browser Cache settings, I see that Media & Other Files settings are set to 1 year by default. However, JSON files and responses (i.e., responses with the
Content-Type: application/json
header) are automatically considered to be in this category as well, which is problematic because most JSON is for API responses, which should not be cached. There’s no way to specifically target JSON files/types.After observing the rules W3 Total Cache is adding to the
.htaccess
file, it seems like it’s adding the following rules which are the culprits:AddType application/json .json ExpiresByType application/json A2419200
There are a couple of options here that can solve this:
- JSON files/types should be moved from the Media & Other Files category to the HTML & XML category.
- (Preferred solution) JSON files/types should be moved into their own category.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘JSON should not be considered “Media & Other”’ is closed to new replies.