Bug 980902 - log a warning recommending the use of sendBeacon during unload instead of synchronous XMLHttpRequest; r=Ehsan draft
authorThomas Wisniewski <twisniewski@mozilla.com>
Thu, 21 Mar 2019 18:40:03 +0000
changeset 11273 649317e1fd78
parent 11272 776b68f3275f
child 11274 5a01144c9a7c
push id173
push userflodolo@mozilla.com
push dateFri, 22 Mar 2019 11:51:01 +0000
reviewersEhsan
bugs980902
Bug 980902 - log a warning recommending the use of sendBeacon during unload instead of synchronous XMLHttpRequest; r=Ehsan log a warning recommending the use of sendBeacon during unload instead of synchronous XMLHttpRequest Differential Revision: https://phabricator.services.mozilla.com/D23799 X-Channel-Repo: mozilla-central X-Channel-Converted-Revision: 7dc8eb2bb2ec1a39db6428b93dd5db837419d920 X-Channel-Repo: releases/mozilla-beta X-Channel-Revision: 629d26021667fd762f2320fc19dc27cf1f65d502 X-Channel-Repo: releases/mozilla-release X-Channel-Revision: 15f10287a218572a7fd47acabb40208645b4462d
dom/chrome/dom/dom.properties
--- a/dom/chrome/dom/dom.properties
+++ b/dom/chrome/dom/dom.properties
@@ -83,16 +83,18 @@ PointerLockDeniedMovedDocument=Request f
 PointerLockDeniedNotInputDriven=Request for pointer lock was denied because Element.requestPointerLock() was not called from inside a short running user-generated event handler, and the document is not in full screen.
 PointerLockDeniedFailedToLock=Request for pointer lock was denied because the browser failed to lock the pointer.
 HTMLSyncXHRWarning=HTML parsing in XMLHttpRequest is not supported in the synchronous mode.
 InvalidRedirectChannelWarning=Unable to redirect to %S because the channel doesn’t implement nsIWritablePropertyBag2.
 # LOCALIZATION NOTE: %S is the name of the header in question
 ForbiddenHeaderWarning=Attempt to set a forbidden header was denied: %S
 ResponseTypeSyncXHRWarning=Use of XMLHttpRequest’s responseType attribute is no longer supported in the synchronous mode in window context.
 TimeoutSyncXHRWarning=Use of XMLHttpRequest’s timeout attribute is not supported in the synchronous mode in window context.
+# LOCALIZATION NOTE: Do not translate navigator.sendBeacon, unload, pagehide, or XMLHttpRequest.
+UseSendBeaconDuringUnloadAndPagehideWarning=Use of navigator.sendBeacon instead of synchronous XMLHttpRequest during unload and pagehide improves user experience.
 JSONCharsetWarning=An attempt was made to declare a non-UTF-8 encoding for JSON retrieved using XMLHttpRequest. Only UTF-8 is supported for decoding JSON.
 # LOCALIZATION NOTE: Do not translate AudioBufferSourceNode
 MediaBufferSourceNodeResampleOutOfMemory=Insufficient memory to resample the AudioBufferSourceNode for playback.
 # LOCALIZATION NOTE: Do not translate decodeAudioData.
 MediaDecodeAudioDataUnknownContentType=The buffer passed to decodeAudioData contains an unknown content type.
 # LOCALIZATION NOTE: Do not translate decodeAudioData.
 MediaDecodeAudioDataUnknownError=An unknown error occurred while processing decodeAudioData.
 # LOCALIZATION NOTE: Do not translate decodeAudioData.