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 thread is resolved. Here is a description of the problem and solution.

Problem: Resources are loaded for both of my languages affecting the loading time Solution: However, there is one thing - for the WPML -> Languages -> Browser language redirect -> if you have any option available apart from this option being disabled (Disable browser language redirect), it is expected that resources from both languages will load because this is JavaScript based solution and that's how language switching works in that case.

Tagged: 

This topic contains 3 replies, has 3 voices.

Last updated by Emke Douwe Ottema 6 months ago.

Assigned support staff: Bruno Kos.

Author Posts
April 16, 2019 at 2:37 am

Angie Ramos

I am trying to: I'm trying to optimize my site loading speed, with WPML enabled it decreases immensely, and according to GTMetrix this is due to the fact that all .js and .css files are being loaded for each subdomain. So they are being loaded twice, in different requests and this has a great impact on my loading time and speed.

I've followed the instructions on one support ticket but I keep getting the same results.
https://wpml.org/forums/topic/pagespeed-score-low-because-all-js-of-fr-and-com-served-from-the-2-urls/

Link to a page where the issue can be seen:
hidden link

I expected to see:
Resources must be served from the main domain.

Instead, I got:
all my js and css are getting served from both domains.

April 16, 2019 at 8:41 am #3619929

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support!

When I try to l login using provided credentials, I get:

ERROR: La contraseña que has introducido para el usuario wpmltest es incorrecta. ¿Olvidaste tu contraseña?

However, there is one thing - for the WPML -> Languages -> Browser language redirect -> if you have any option available apart from this option being disabled (Disable browser language redirect), it is expected that resources from both languages will load because this is JavaScript based solution and that's how language switching works in that case.

Regards,
Bruno Kos

April 23, 2019 at 1:04 am #3658883

Angie Ramos

Thanks, Bruno, I just disabled the language redirect and now the loading time has improved. I wish I would have to disable it, but it's working fine.

May 8, 2019 at 8:40 am #3764647

Emke Douwe Ottema

Hi,

I got exactly the same problem. After disabling the redirect option the pagespeed is much improved. Is there a way to fix this or to redirect users in a different way?