Mobile
Android
Silk/
Kindle
BlackBerry
Opera Mini
Opera Mobi
#1
RewriteCond %{HTTP_USER_AGENT} windows|linux|mac [NC]
RewriteCond %{HTTP_ACCEPT} "image/webp"
RewriteCond %{HTTP_USER_AGENT} !mobile|bot|chrome-lighthouse [NC]
RewriteRule .* - [E=Cache-Control:vary=isDesktop]
#2
RewriteCond %{HTTP_USER_AGENT} version/(\d{2}).*safari [NC]
RewriteCond %1 <14
RewriteCond %{HTTP_USER_AGENT} !mobile|bot|chrome-lighthouse [NC]
RewriteRule .* - [E=Cache-Control:vary=isDesktopNoWebpSafari]
#3
RewriteCond %{HTTP_USER_AGENT} version/(\d{2}).*safari [NC]
RewriteCond %1 >13
RewriteCond %{HTTP_USER_AGENT} !mobile|bot|chrome-lighthouse [NC]
RewriteRule .* - [E=Cache-Control:vary=isDesktopWebpSafari]
#4
RewriteCond %{HTTP_USER_AGENT} android|silk/|kindle|blackberry|opera\ mini|opera\ mobi|crios|fxios [NC]
RewriteCond %{HTTP_ACCEPT} "image/webp"
RewriteCond %{HTTP_USER_AGENT} !bot|chrome-lighthouse [NC]
RewriteRule .* - [E=Cache-Control:vary=isMobile]
#5
RewriteCond %{HTTP_USER_AGENT} version/(\d{2}).*mobile.*safari [NC]
RewriteCond %1 <14
RewriteCond %{HTTP_USER_AGENT} !bot|chrome-lighthouse [NC]
RewriteRule .* - [E=Cache-Control:vary=isMobileNoWebpSafari]
#6
RewriteCond %{HTTP_USER_AGENT} version/(\d{2}).*mobile.*safari [NC]
RewriteCond %1 >13
RewriteCond %{HTTP_USER_AGENT} !bot|chrome-lighthouse [NC]
RewriteRule .* - [E=Cache-Control:vary=isMobileWebpSafari]
#7
RewriteCond %{HTTP:Sec-Fetch-Dest} ^$ [NC]
RewriteCond %{HTTP:Sec-Fetch-Mode} ^$ [NC]
RewriteCond %{HTTP:Sec-Fetch-Site} ^$ [NC]
RewriteCond %{HTTP:Sec-Fetch-User} ^$ [NC]
RewriteCond %{HTTP_USER_AGENT} !version/.*safari [NC]
RewriteRule .* - [E=Cache-Control:vary=isBot]
#7
RewriteCond %{HTTP_USER_AGENT} applebot [NC]
RewriteCond %{HTTP_USER_AGENT} !mobile [NC]
RewriteRule .* - [E=Cache-Control:vary=isBot]
#8
RewriteCond %{HTTP:Sec-Fetch-Dest} ^$ [NC]
RewriteCond %{HTTP:Sec-Fetch-Mode} ^$ [NC]
RewriteCond %{HTTP:Sec-Fetch-Site} ^$ [NC]
RewriteCond %{HTTP:Sec-Fetch-User} ^$ [NC]
RewriteCond %{HTTP_USER_AGENT} mobile [NC]
RewriteCond %{HTTP_USER_AGENT} !version/.*safari [NC]
RewriteRule .* - [E=Cache-Control:vary=isMobileBot]
#8
RewriteCond %{HTTP_USER_AGENT} applebot [NC]
RewriteCond %{HTTP_USER_AGENT} mobile [NC]
RewriteRule .* - [E=Cache-Control:vary=isMobileBot]
</IfModule>