Skip Navigation

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.

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Mohamed Sayed 1 year, 11 months ago.

Assisted by: Mohamed Sayed.

Author Posts
January 16, 2023 at 10:43 am #12825667

chrisW-51

I want to set wp-wpml_current_language cookie httponly and sucure for sucurity reason.How can I set this.
Thx!

wpml cookies.png
wpml cookies.png
January 16, 2023 at 1:48 pm #12827255

Mohamed Sayed

Hi there,
Thanks for contacting WPML support.

I'm consulting our developers about this request and will update you once I get their reply.

Regards,
Mohamed

January 16, 2023 at 3:42 pm #12827869

Mohamed Sayed

Hi,

I got the reply from our developers.

Please note that setting the wp-wpml_current_language cookie as "HttpOnly" is not recommended because it would prevent JavaScript from accessing the cookie. This attribute is typically used for server-side session cookies that don't need to be available to JavaScript.

But in this case, the cookie should be available for Javascript to avoid affecting the AJAX calls from different themes/plugins on the site's front end (https://wpml.org/documentation/getting-started-guide/language-setup/enabling-language-cookie-to-support-ajax-filtering/).

Regards,
Mohamed