Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

Caching headers for static content: cache-control: private is send for authenticated users?

$
0
0

Hi everybody.

We have setup caching for static content as described in https://world.episerver.com/documentation/developer-guides/digital-experience-platform/development-considerations/cdn-recommendations/, and it works fine for anonymous users. However, when a user is logged in to Episerver cache-control:private is send in the response instead.

As we are using authentication for our end-users (we are provinding an extranet), it does not make any sense for us not to cache static content for those users.

Anyone who knows why cache-control: private is used by Episerver when a user is authenticated?

Our relevante sections in web.config are as follows:

<staticContent><clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" setEtag="false" /><remove fileExtension=".woff" /><remove fileExtension=".woff2" /><remove fileExtension=".otf" /><remove fileExtension=".ttf" /><remove fileExtension=".svg" /><remove fileExtension=".eot" /><remove fileExtension=".json" /><mimeMap fileExtension=".woff" mimeType="application/font-woff" /><mimeMap fileExtension=".woff2" mimeType="application/font-woff2" /><mimeMap fileExtension=".otf" mimeType="application/x-font-opentype" /><mimeMap fileExtension=".ttf" mimeType="application/octet-stream" /><mimeMap fileExtension=".svg" mimeType="image/svg+xml" /><mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" /><mimeMap fileExtension=".json" mimeType="application/json" /></staticContent><caching><profiles><add extension=".gif" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:30:00" location="Any" /><add extension=".png" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:30:00" location="Any" /><add extension=".js" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:30:00" location="Any" /><add extension=".css" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:30:00" location="Any" /><add extension=".jpg" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:30:00" location="Any" /><add extension=".jpeg" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:30:00" location="Any" /></profiles></caching>

Viewing all articles
Browse latest Browse all 8020

Trending Articles