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
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

This topic contains 1 reply, has 0 voices.

Last updated by Dražen 3 days, 1 hour ago.

Assisted by: Dražen.

Author Posts
September 16, 2025 at 3:51 pm #17406979

danielM-171

Background of the issue:
I am working on optimizing the HGF real estate site and have improved the staging site significantly. However, Google's PageSpeed Insights indicates that the Browser Re-direct application in WPML is causing issues. I believe this is due to the detection of browser languages and redirecting visitors to the relevant language. You can see the issue by running the URL hidden link in hidden link.

Symptoms:
PageSpeed Insights is complaining about the use of legacy JS in the Browser Re-direct script, which is reducing the mobile score to below 90.

Questions:
How can I resolve the issue of legacy JS in the Browser Re-direct script?
Is there a way to modernize the application to improve PageSpeed scores?

September 17, 2025 at 7:09 am #17408227

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for reaching out to us.

Unfortunately the thing is, as you can see in the Google message, that adjusting this code would then make it work only for modern browsers, but we need to be able to support all browser out there and clients using.

On the other hand, using browser redirect can cause issue with SEO and Google indexing, so if not really mandatory for your case, maybe best would be to disable it.

- https://wpml.org/documentation/getting-started-guide/language-setup/automatic-redirect-based-on-browser-language/how-browser-language-redirect-affects-google-indexing/

Let me know if this is helpfull.

Regards,
Drazen