How Weglot manages your website performance
In this article, you'll learn more about how Weglot affects your website's performance according to your chosen integration.
1. General performance
Here is how Weglot works on the translated versions of your website:
- It scans the original content of your website (HTML file);
- After the scan, Weglot parses (reads and cuts) the elements between HTML tags;
- It automatically translates this original content to its translated equivalent.
- During the translation process, Weglot also stores your content in your Translation List, which is available in your Weglot Dashboard.
This process allows Weglot to translate and display the translations on your website within seconds.
Keep in mind that the more elements on your original page, the longer it may take to load, and for Weglot to parse and translate the entire page.
To help with this, Weglot uses a Content Delivery Network (CDN) to reduce the load time of your translated pages.
The goal is to display content while maximizing the range of several mirror servers worldwide. The content will be displayed on the closest server.
This system guarantees a high availability of servers, reduces loading time, and increases the general website's performance.
Since a CDN uses mirror servers, your modifications may not immediately apply directly to our original server.
To prevent this, Weglot uses "versioning," which updates the version when modifications are made. Here, the CDN servers are notified of the new version and are temporarily deactivated to let you make changes.
The load time can be a little longer on the very first call of a new version of your website. This is because your browser needs to contact the mirror server, then the original one.
Afterward, visitors will connect to the nearest mirror server, which will have the new version, and your website will be cached.
For non-WordPress projects, Weglot will also implement a JavaScript Library to add the language switcher and ensure it functions properly.
Weglot constantly monitors and looks for solutions to deliver the best performance possible.
2. WordPress Integration
The WordPress integration is quite different, relying on the WordPress structure with plugins, filters, and hooks. This is all to enable high compatibility with other Plugins and WordPress in general.
Its overall performance works similarly to that of our other integrations:
- You will have unique URLs for your translated content
- Translations are handled server-side for SEO purposes
You could use a JavaScript integration on WordPress, but we recommend using the plugin. Its compatibility with WordPress ensures a smoother integration and workflow than a JavaScript integration.
Additionally, you may have your own cache plugin installed for performance. As Weglot is located "behind" it, you may sometimes need to purge the cache in this plugin to see your modifications from Weglot.
3. JavaScript integration
The JavaScript integration can be set for every technology you may use.
With it, your original language and translated languages will be displayed on the same URL, but not simultaneously.
When a visitor switches languages with the language switcher, Weglot dynamically replaces the text to translate with its translation.
Weglot will parse your website and translate your content "on the fly". The translations are handled client-side.
You can add some elements to the dynamic section in Weglot. It will allow Weglot to re-check the elements selected and translate them, even if they were generated after Weglot's first parse.
However, the more dynamic elements you have, the more time Weglot may need to display your translations.
This integration is not SEO-friendly. However, you can switch to our subdomain integration for better SEO!
4. Subdomain integration
Subdomain integration is recommended SEO-wise. You will have unique URLs for your translated content, and translations are handled server-side for SEO purposes.
When switching translations, your visitors will not see the content changes; they will be redirected to the translated page.
This integration reduces the number of dynamic elements you might add as it allows Weglot to access more content on your website, which can result in better performance.