You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Synchronous XHR requests often cause hangs on the web, especially with poor network conditions or when the remote server is slow to respond. Synchronous XHR is now deprecated and should be avoided in favor of asynchronous requests.
956
+
957
+
:::
958
+
959
+
When using synchronous XHR requests, you may see the following warnings:
960
+
961
+
> **Warning: Synchronous XHR request was not intercepted: http://example.com.**
962
+
963
+
Cypress is unable to intercept a synchronous XHR request if the [`cy.intercept()`](/api/commands/intercept) is using a [`routeHandler`](/api/commands/intercept#routeHandler-Function).
964
+
Thus, the [`routeHandler`](/api/commands/intercept#routeHandler-Function) won't be executed and the request will be sent to the origin server without any modifications.
965
+
An intercept with a [`StaticResponse`](/api/commands/intercept#staticResponse-StaticResponse) does not have this limitation and will still be executed.
966
+
967
+
> **Warning: Cookies may not have been applied to synchronous XHR request: http://example.com.**
968
+
969
+
Cypress is unable to apply cookies to a synchronous XHR request if the request is cross-origin to the `top` origin.
970
+
971
+
> **Warning: Cookies may not have been set for synchronous XHR response: http://example.com.**
972
+
973
+
Cypress is unable to set cookies for a synchronous XHR response if the request is cross-origin to the `top` origin.
0 commit comments