Icon

Adding geolocation data to cookies at the edge provides personalized location-based services without additional requests to the origin server. This improves performance and enhances the user experience by providing relevant content based on the user's location.

Loading...

https://www.edgecompute.live/edgeworkers/personalization/cookieGeoLocationDemo.html

Copied to clipboard!

Implements an EdgeWorker to add geolocation data to a cookie in the HTTP response. This cookie returns location information about the client where the request originates, including a lookup from custom data.

Icon landscape
Geolocation Information

Apply dynamic business logic based on the request's origin location information.

Icon landscape
Reduce Latency

Speed up response times by moving work closer to users.

Related Examples

View More
Icon Card background
Geolocation

This example implements a microservice GEO-Location API call that returns location information about the client where the request originates.

View Case
Icon Card background
Store Locator

Implements a microservice store locator API call that returns the two stores nearest to the provided latitude and longitude.

Note: Latitude and Longitude values are hardcoded for demo purposes.

View Case
Icon Card background
Traffic Allow

Implements an allow list depending on the geographic locale of the end user. If the user is arriving from United States embargoed countries, a 403 deny will occur.

View Case