Nice solution.
But it is not ideal if we want to let the user stay on the desktop website after using the force=1 GET parameter. (Many users like to browse the desktop version of a website even if displayed on a mobile device.)
You may want to consider creating a "preference cookie" when that parameter is used.
In such a scenario, the desktop website can offer a link to the mobile version if our user wants to go back to that version.
Nice solution.
But it is not ideal if we want to let the user stay on the desktop website after using the force=1 GET parameter. (Many users like to browse the desktop version of a website even if displayed on a mobile device.)
You may want to consider creating a "preference cookie" when that parameter is used.
In such a scenario, the desktop website can offer a link to the mobile version if our user wants to go back to that version.