Welcome! Log In Create A New Profile

Advanced

What fastcgi_cache_key to use for mobile page caching

Posted by kb-kown 
What fastcgi_cache_key to use for mobile page caching
April 29, 2013 06:43AM
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 136
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready