Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem: when using automatic language redirection it takes too much time to redirect to the correct language

Solution: WPML language browser redirection works with a javascript, so it must be loaded before it can redirect users to the correct language. Improving the whole site speed will improve loading time too.

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.

This topic contains 4 replies, has 2 voices.

Last updated by jeroenv-42 2 years, 2 months ago.

Assigned support staff: Laura.

Author Posts
July 9, 2018 at 9:42 pm

jeroenv-42

WPML detects the browser's language and redirects a user to the right version of the website. When someone is based in the Netherlands for example, he gets redirected to spikesandsparrow.com/nl/. The issue is that spikesandsparrow.com (the English version of the website) is being loaded first before redirecting the user. This takes a lot of time. is it possible to have a user be redirected immediately instead of waiting for the English website to be loaded?

July 10, 2018 at 12:29 pm #2481079

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

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

Hi,

WPML language browser redirection works with a javascript, so it must be loaded before it can redirect users to the correct language. However, it shouldn't take too long to load.
What times are we talking about?

July 10, 2018 at 12:38 pm #2481164

jeroenv-42

It takes quite some time before it redirects people to the Dutch version of the website. We are still working on improving the site speed which should help. Besides that, is there anything I can do to have the WPML redirects work better/be faster?

July 11, 2018 at 3:23 pm #2487432

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

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

Hi,

we can try to see how much faster is the loading without the js script, but there isn't much we can do to improve the script itself. If you improve the performance of the whole site, the redirect will be faster, too.

July 15, 2018 at 8:36 pm #2527234

jeroenv-42

In that case I will just try to speed up the website. Thanks for the help!