Easily identify the user's language and redirect them on the client side using JavaScript with Akamai

My website is available in 18 different languages, each with its own translated domain. There are unique products only available in specific languages, making it crucial for users to easily switch between languages. However, the language selector may not be easily found by users unfamiliar with the current language. This issue becomes even more important when considering paid ad traffic that could go to waste if not addressed.

I currently use Akamai as a CDN and had initially looked into doing detection and redirection using JavaScript on the Edge Server layer to avoid additional server calls. Despite searching through documentation and configuration options, I was unable to find a suitable solution within Akamai's platform.

While working with an Akamai engineer to develop a workaround, I remain open to exploring other solutions that may be more optimal for this language switching issue.

Answer №1

Akamai offers a service known as "Content Targeting", previously named "Edgescape". This service adds detailed information about the end user to every incoming request at the edge by inserting a layer-7 (http) header called "x-akamai-edgescape": City, State, Country, Zip, Area code, ISP, ISP throughput (DSL, satellite), and more.

Once this information is incorporated into the request header, the origin server can make decisions based on it. For example, redirecting users from certain countries to specific subdomains like spanish.yourdomain.com. Alternatively, Akamai's servers are capable of processing this data with their edge logic, where they can evaluate the country value in the HTTP header and generate redirects accordingly. Additionally, they can set cookie values for subsequent requests, tailoring the user experience based on preferences and desired application behavior.

If you have access to the Akamai customer portal, explore the documentation for Edgescape and ACO (Advanced Cache Optimization) which enables analysis of headers/cookies to inform decision-making processes.

Best of luck in leveraging these capabilities.

p.s. While Edgescape and ACO are optional modules from Akamai, existing customers may already have access to them or be able to include them in their services through contract renegotiation at little or no additional cost.

Answer №2

Although not directly available in the user interface, there is a workaround that has been established for this situation. By providing them with a domain mapping linked to the accept-language header (which I believe is the most efficient method since all I need to modify on the website is the language and language-dependent settings), their engineer will configure it to automatically redirect at the Edge to the appropriate domain based on that header. Additionally, they will assign a cookie to the individual to recognize that they have been redirected. This allows the person to freely navigate through the site without being continuously redirected if they utilize the language selector or access another language-specific link, thus granting them the freedom to choose where they want to go without any forced redirection.

The only drawback seems to be that if any modifications are required in the future, I would need to rely on their assistance to make the changes rather than being able to do it myself - unless I am overlooking something.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Bring Jest into everyday script

Can Jest be imported into a file that is not intended to run as a test and does not include any test cases (such as a support module for tests)? ...

The Issue of Double-Clicking on Table Cells in Internet Explorer 8

I implemented a JQuery function to add a double click event listener to a table, which triggers a modal popup when a cell is double-clicked. While this functionality works seamlessly in Firefox, there is an issue in IE8 where double-clicking a cell highli ...

Navigate down to the bottom of the element located on the webpage

I'm trying to create a feature where clicking an anchor tag will smoothly scroll to a specific element on the page. Currently, I am using jquery scrollTo for this purpose. Here's the code snippet: $.scrollTo( this.hash, 1500, { easing:&apos ...

Experiencing the issue of receiving the "Cannot set headers after they are sent to the client" error message while using Express

Here is a screenshot showing the error message: This is the code for the client-side: API with attached jwt: Take a look at the function used to verify the jwt: const authHeader = req.headers?.authorization; if(!authHeader){ return res.s ...

Creating a dynamic user interface with multiple tab navigations using jQuery on a single web

On my current HTML page, I am facing an issue with multiple tab navigations. When I click on one navigation, it also affects the other tab navigations. I cannot seem to find a way to only affect the tab navigation that I am clicking on without hiding the ...

Sharing a div or text upon checking a box

I am new to JavaScript and I'm searching for an article or method to achieve the following task, whether it's through a form or just JS (without using PHP). I have a set of checkboxes labeled as box 1 - 4. When any one of them is checked, I want ...

Enable Parse5's case sensitivity

Recently, I've attempted to parse Angular Templates into AST using the powerful parse5 library. It seemed like the perfect solution, until I encountered an issue - while parsing HTML, it appears that the library transforms everything to lowercase. Fo ...

Is it possible to transfer a component's function as a property to a nested component in React?

I have a ListContact component and a ListSupplier component. ListSupplier is a child component of ListContact. The contact component contains a table with display results. The supplier component triggers a modal within the contact component, allowing a sel ...

Issue with retrieving selected radio button value from form in ExtJS. Value not being returned

I have successfully implemented the necessary steps to retrieve the chosen value from my radio button form. .... xtype: 'radiofield', name: 'timespan', id: 'timespan', value: 7, ...

Discover the root cause of why an element is being prioritized

Is it possible to determine what is causing the first html element (input, textarea) to gain focus? While loading a modal window, I am unable to locate the line of JavaScript that is setting focus() on this initial element. One workaround is to blur() it ...

Setting a specific time zone as the default in Flatpickr, rather than relying on the system's time zone, can be

Flatpickr relies on the Date object internally, which defaults to using the local time of the computer. I am currently using Flatpickr version 4.6.6 Is there a method to specify a specific time zone for flatpickr? ...

Tips for showcasing axios data on Vue components

I'm just starting out with Vue.js and I'm struggling to grasp how it all works. I have a function that sends data to the server and receives a response using axios. However, when I try to display the response using a variable, something seems to ...

Utilizing ngRepeat to build intricate rows within a table

I have a unique collection that appears as follows: { "10": {}, "12": { "20": { "value": 1, "id": 1, }, "100": { "value": 12, "id": 1, } }, "14": { "10 ...

Despite successfully passing props into V-for, the output does not display the props as expected

I've been attempting to accomplish a straightforward task, but for some reason, it's not working and I can't figure out why. Within the parent component, App.vue, I have the following: data() { return { servers: [ { ...

jquery interval randomly selecting a new option instead of verifying the correct answer

Below is a jQuery game created with aspx that runs on a 3000 millisecond interval. $(document).ready(function () { var interval; //initialize timer interval = setInterval(function () { //create timer ...

JavaScript event target compatibility with IE8

Similar Question: Javascript IE Event The script I have written is causing issues specifically in IE8, while working fine on all other browsers. The error message I am seeing is: 'tagName is null or not an object'. Even though I am aware tha ...

What is the best way to convert AMD-written code to CommonJs format without needing to bundle it together?

Currently, I have a project that was initially written for browsers using AMD modules. Now, I am in need of running the same code in Node.js. This requires me to rewrite each file to use CommonJS modules instead. I did attempt to use webpack, but it prov ...

Build a customizable digital clock script with Javascript/jQuery that displays the time in 24-hour format

Currently seeking a 24-hour format digital clock script in JavaScript/jQuery that also includes the date. The unique feature of this clock is that it will display images as its numbers and date, making for a visually appealing design. Additionally, I wou ...

Determine when an item is checked in a React array

In the code snippet below, I have a method that toggles the checked state of an element when clicked. const [elements, setElements] = useState([]); const handleElementClick = (index) => { setElements(prevState => { return prevState.map(( ...

Storing the array in the browser's local storage

Here is the complete code I am working on My goal is to save the visited array to local storage. Then, I want to use an if statement to check if the array has been stored. If it has, the code will execute: return; This will end the code execution and ma ...