Icon

Routing requests based on the device type at the edge ensures that users receive content optimized for their specific device. This enhances user experience by delivering device-appropriate content efficiently and reduces the load on the origin server.

Loading...

https://www.edgecompute.live/edgeworkers/personalization/forwardDevicetype

Copied to clipboard!

Implements modification of the forward origin path of the URL to return device-specific content.

Icon landscape
Device Heuristics

Customize dynamic behavior based on the user's device.

Icon landscape
Ease Development

Enable developers to modify application behavior without touching origin server logic.

Related Examples

View More
Icon Card background
A/B Testing

Randomly assigns a new user to a group for A/B testing. The assignment is stored in a cookie and passed to the origin in a query parameter. The A/B group can be forced via a query string parameter for easy testing. The group names, percentage split, cookie name, and query parameter name are configured through constants in the EdgeWorker JavaScript module.

View Case
Icon Card background
API Orchestration

Demonstrates how EdgeWorkers can be used to merge multiple internal APIs into a single API response from a user experience perspective.

View Case
Icon Card background
Cachekey Device Type

This example includes the device type (tablet or mobile) from a PMUSER variable in the computed cache key for an Edge Server.

View Case