WebSonic allows you to cache your dynamic content (HTML pages or API responses) for each specific device e.g. desktop, mobile, tablet, or smart TV.
Using a custom caching handler, you can configure WebSonic to create separate cache objects for each device type.
Stop device detection on the backend server When using device-based caching, you should only rely on WebSonic device identification headers to detect device type on the back-end server so that CDN caching logic and backend remains in sync. Otherwise, CDN can detect a device type mobile, while the backend serves content for the desktop. This will result in caching the wrong content.
If the device is other than a desktop, the WebSonic server will add device type headers before forwarding request to your origin.
Device Type | Header name | Header value |
Mobile |
|
|
Tablet |
|
|
Smart TV |
|
|
​