Skip to content Skip to sidebar

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Madrid (GMT+01:00)

Tagged: 

This topic contains 8 replies, has 0 voices.

Last updated by Marcel 4 days, 16 hours ago.

Assisted by: Marcel.

Author Posts
February 6, 2026 at 2:13 pm #17800031

felixL-7

Hi,
we obverse a heavy performance degregation when browser language detection is switched on by 30-40%.
We observe the following:
1. Google page speed analysis labels …browser-redirect/app.js containing outdated javascript. Are you planning to modernise this script?
2. …browser-redirect/app.js is as heavy as our main js fail run ALL javascript of the site. Could you help us to understand how one feature such as browser language detection can take up that much space?
3. It seems that the language detection does not happen at the very beginning of the page load but much later. Is there any way to optimize this?
4. We are confused about this issue and wonder whether different themes might handle this differently. Glad if you could share your experience with this.

Thank you

February 6, 2026 at 3:18 pm #17800243

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi Felix,

We’re aware that Google flags this as outdated JavaScript and reports a performance penalty of approximately 36 KB. However, please note that this is legacy JavaScript, including older Babel transforms and certain polyfills (such as Array.from, Array.flat, Promise.any, Object.assign, Reflect.*, and various String.prototype methods), which are required to maintain compatibility with older browsers.

I’ve raised this with our development team to review whether any optimizations are possible without compromising browser support.

Best regards,
Marcel

February 6, 2026 at 3:29 pm #17800261

felixL-7

Thank you for your support. Could you address my point 2?

February 6, 2026 at 3:33 pm #17800320

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

There are no reports of this issue so far (point 2). The first step would be to provide a staging environment where the issue can be reproduced in isolation. This will allow us to determine whether your code might be causing a combination of errors (which will also answer point 3+4)

Best regards,
Marcel

February 6, 2026 at 3:37 pm #17800330

felixL-7

Thank you. Are we waiting for the developers first or you want an export of the website and/or a staging environment from our side? Thank you

February 6, 2026 at 3:42 pm #17800333

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Feel free to share a copy in the meantime—either a staging environment or a duplicator package for local debugging.

Best regards,
Marcel

February 11, 2026 at 4:20 pm #17813657

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

Thank you for granting access. I can see that the redirect is currently active. However, I’m not sure how to reproduce the issue you described in point 2:

2. …browser-redirect/app.js is as heavy as our main js fail run ALL javascript of the site.

Could you please let me know where exactly I can reproduce this issue? Is there a specific page, function, or example I should check to see how app.js is affecting other JavaScript on the site?

Best Regards,
Marcel

February 11, 2026 at 4:31 pm #17813739

felixL-7

Hi Marcel,

many thanks for your response. As per screenshot attached from google page speed, you can see that the wpml redirect javascript file has the same size as the javascript libarary of our front end containing als feature and is significantly bigger than the jquery library. In my perpective, the redirection javascript should be significantly smaller than those other files?

Thanks,
Jona

Bildschirmfoto 2026-02-11 um 17.25.00.png
February 11, 2026 at 4:45 pm #17813820

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi Jona,

this seems OK. The original file in filesystem is 170kb. Please keep in mind that the file itself is a minified 3rd party library. However, I will share this too with our team.

Best Regards,
Marcel