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 stores your content in your Translation List, which is available in your Weglot Dashboard, and then displays the translations.
This process allows Weglot to translate and display the translations on your website within seconds.
Please 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 your content.
To help with this, Weglot uses a Content Delivery Network (CDN) to reduce the load time of your translated pages. CDN is a geographically distributed group of servers that caches content close to end users. Our objective with CDN is to display content while maximizing the range of several mirror servers worldwide. The content will be loaded and displayed from 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, note that your modifications on your website may not be visible immediately.
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 bit longer on the very first call of a new version of your website as your browser needs to contact the mirror server, which needs to contact the original server. 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 implement a JavaScript Library onto your website. This library will add the language switcher and ensure it operability. This library allows you to add dynamic elements to your Weglot Dashboard > Settings > App Settings.
It will allow Weglot to re-check the elements selected and translate them dynamically, even if they are generated after Weglot's first parse. However, please note that the more dynamic elements you have, the more time Weglot may need to display all your translations.
Weglot is constantly monitoring and looking 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. These features enable high compatibility with other plugins and WordPress in general.
Its overall performance works similarly to that of our Subdomain and Subdirectory integrations:
- You will have unique URLs for your translated content
- Translations are handled server-side for SEO purposes
- The pages managed by Weglot will make use of the CDN system
As your content will be translated into your website's source (server-side), your visitors won't see the switch from your original language to the translated language they chose. The page will load directly translated.
Additionally, you may have installed plugins managing server-side cache for improved performances on your website. Weglot is located "behind" any server-side cache, meaning that modifications made on Weglot will not be updated in the server-side cache by default. You will sometimes need to purge the cache in these plugins to see your modifications.
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 page, but not simultaneously. When a visitor switches languages with the language switcher, Weglot dynamically replaces your content with its translation.
Weglot will parse your website and translate your content "on the fly". The translations are handled client-side. In this regard, please note that the JavaScript integration is not SEO-friendly. However, you can switch to our subdomain or our Subdirectory integration for a multilingual SEO!
4. Subdomain integration
The Subdomain integration is recommended SEO-wise. You will have unique URLs for your translated content, and translations are handled server-side for SEO purposes.
If your website's base URL is https://www.mywebsite.com/ or https://mywebsite.com/, the translations will be displayed on https://XX.mywebsite.com/, with XX being the 2-letter language code of the current language.
Therefore, when switching languages, your visitors will not see the content changes; they will be redirected to the corresponding subdomain. The translations are performed on the server side, directly in the source of the page, which means that the page will load directly translated, removing any blocking time related to JavaScript execution for translations.
As you will have dedicated URLs for your translated languages, as Weglot translates the content server-side for Google bots, and as Weglot will add the corresponding hreflangs depending on the current page and language, this integration will enable the indexation of your translated pages.
Weglot will only manage your translated subdomains. Your original version will still be served by your CMS or your editor, so Weglot could only impact the performance of the Subdomains.
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.
5. Subdirectory integration
The Subdirectory integration is also recommended SEO-wise. You will have unique URLs for your translated content, and translations are handled server-side for SEO purposes.
If your website's base URL is https://www.mywebsite.com/ or https://mywebsite.com/, the translations will be displayed on https://www.mywebsite.com/XX/ or https://mywebsite.com/XX/, with XX being the 2-letters language code of the current language.
This integration has the same advantages as the Subdomain integration and offers even further advantages. As Weglot will manage your entire website, including your original version, it will be able to entirely manage your SEO by adding the hreflangs on your translated version and on your original version.
Weglot will manage the display of your entire website, as this integration requires the modification of your main DNS record in order to make it point toward Weglot servers.
Weglot will then act as a reverse-proxy. When a visitor will try to visit your pages, Weglot will receive the request, fetch the data from your original content, translates your content and display the translated pages. You can see Weglot acting as a bridge that translate the content and display it on the corresponding pages.
Therefore, this setup may induce some very small delay when loading your pages depending on the CDN provider used, even on your original version, as Weglot will fetch the page in between and perform translations if needed.
But rest assured; Weglot uses some of the best CDN providers in the world, so your website can be seen from anywhere, anytime, as fast as possible.
This integration also reduces the number of dynamic elements you might add, as it also allows Weglot to access more content on your website (from the source), which can result in better performance.
For further details about our integrations and their setup, please take a look at our Weglot Technical Presentation.