The Mobile Switch (Varnish) module provides a simple automatic theme switch functionality for mobile devices, utilising Varnish for detecting the user-agent and providing proper cacheable pages using the same URLs per mobile device group.
Difference between this module and Mobile Switch
Initially we were using Mobile Switch but for our busy site we couldn't afford for the user-agent detection to be taking place within Drupal. Anywhere we can avoid bootstrapping Drupal the better to relieve the load on our servers. Note this module is NOT a fork of Mobile Switch, see the section on "How it works" for more details.
How it works
The module works by adding a device key to the beginning of the Varnish hash. This ensures that each device group maintains its own separate page cache meaning, entire separately themed pages can be used for each group. NOTE: you will not need this as a solution should you be using a responsive theme as you will then only be using one page cache across all your devices.
Similar modules
- Mobile Switch
- The Mobile Switch module provides a simple automatic theme switch functionality for mobile devices, detected by Browscap or Mobile Detect.
- Mobile Theme
- Adds the ability to choose a mobile theme in admin/build/themes/settings which is used for serving users on mobile devices.
- Mobile Tools
- The Mobile Tools module provides Drupal developers with some tools to assist in making adjustments to your site based on the visitor's device.
- Switchtheme
- Adds a block to allow users to switch between enabled themes.
Credits
Loosely based around the work on this page - which in turn, appears to be based on this page!
Written as a proof of concept for The British Council but not used... It's a long story...
Project information
Unsupported
Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projectsObsolete
Use of this project is deprecated.3 sites report using this module
- Created by pobster on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
