利用するヘッダー CloudFrontは、リクエストヘッダーに基づいてコンテンツをキャッシュできます。 デバイス判断は、通常 User-Agent を利用しますが、User-Agent ごとにキャッシュを保存するとキャッシュ効率が悪くなります。そのため、CloudFrontでは、デバイスタイプごとにキャッシュを保存したい場合、以下のヘッダーを利用するようです。 CloudFront-Is-Desktop-Viewer CloudFront-Is-Mobile-Viewer CloudFront-Is-SmartTV-Viewer CloudFront-Is-Tablet-Viewer CloudFrontの設定 Edit Behavior Edit Behaviorを開きます。 Cache Based on Selected Request Headersの項目で設定します。 これでデバイ
![AWS | CloudFrontでデバイスタイプごとにキャッシュを保存させる方法 - わくわくBank](https://cdn-ak-scissors.b.st-hatena.com/image/square/e5e642329bf5d26f1dbc45ea88f5dce2ab5424ff/height=288;version=1;width=512/https%3A%2F%2Fwww.wakuwakubank.com%2Fwp-content%2Fuploads%2F673-aws-cloudfront-cache-header_thumbnail.png)