This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is working on optimizing a real estate site and has encountered issues with Google's PageSpeed Insights, which indicates that the WPML Browser Redirect feature is causing performance problems due to legacy JavaScript. This issue is affecting the mobile score, reducing it to below 90.
Solution:
We explained that modifying the Browser Redirect script to exclude legacy JavaScript would limit functionality to only modern browsers, which is not ideal as we aim to support a wide range of browsers. Additionally, we noted that using browser redirects could negatively impact SEO and Google indexing. Therefore, we recommended considering the deactivation of this feature if it is not essential for the client's needs. For more details on how browser language redirect can affect Google indexing, please visit our documentation.
If this solution does not apply to your situation, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket at our support forum.
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.