Hello,
I have a website that serves web pages based on user agents to differentiate between mobile and desktop users.
So, the same URL will look different depending on whether you are viewing it on desktop or mobile phone.
Currently, I am using fastcgi_cache to cache only desktop pages to prevent accidentally serving mobile pages to desktop users, or vice versa.
But I think it is possible to cache the mobile pages if I get the fastcgi_cache_key right.
Currently, my fastcgi_cache_key is $scheme$request_method$host$request_uri.
I can't use $http_user_agent$scheme$request_method$host$request_uri because that will mean generating too many duplicate files since there are many types of user agents.
Any suggestion is much appreciated.
I have a website that serves web pages based on user agents to differentiate between mobile and desktop users.
So, the same URL will look different depending on whether you are viewing it on desktop or mobile phone.
Currently, I am using fastcgi_cache to cache only desktop pages to prevent accidentally serving mobile pages to desktop users, or vice versa.
But I think it is possible to cache the mobile pages if I get the fastcgi_cache_key right.
Currently, my fastcgi_cache_key is $scheme$request_method$host$request_uri.
I can't use $http_user_agent$scheme$request_method$host$request_uri because that will mean generating too many duplicate files since there are many types of user agents.
Any suggestion is much appreciated.