Details
-
Improvement
-
Resolution: Unresolved
-
High
-
1.11.0
Description
The recommendationrestclient.js uses the synchronous XMLHttpRequest, which results in the following warning shown in the browser's console on frontoffice pages that use the displaying of the recommendations:
(index):114 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
XMLHttpRequest.open @ (index):114
eZ.RecommendationRestClient.ping @ 6b167d7_recommendationrestclient_4.js:100
eZ.RecommendationTemplateRenderer.displayRecommendations @ 6b167d7_recommendationtemplaterenderer_2.js:56
(anonymous) @ 6b167d7_recommendationrestclient_4.js:55
XMLHttpRequest.send (async)
eZ.RecommendationRestClient.fetchRecommendations @ 6b167d7_recommendationrestclient_4.js:83
(anonymous) @ (index):84
(anonymous) @ (index):89
Steps to reproduce
- Set up the fresh installation of eZPlatform with eZ Recommendation using the install steps: https://github.com/ezsystems/EzSystemsRecommendationBundle#step-1-installation.
- Configure the displaying of recommendations using the following steps: https://github.com/ezsystems/EzSystemsRecommendationBundle#displaying
- Open your browser's console. In the frontoffice, go to the page that has recommendations displaying configured. In your browser's console, the above warning will be displayed.