Revert "Pre-fetch RESTBase DNS and negotiate TLS"

This is no longer needed, as VisualEditor now loads the content
from the /api/rest_v1/ entry point at the main project domain.

This reverts commit c741db5378.

Bug: T97500

Change-Id: I9b0dba58484884cdf3c7917c633b9815de4c9f92
This commit is contained in:
GWicke 2015-04-29 01:03:52 +00:00
parent 3152dc104f
commit a44fbbf924
2 changed files with 0 additions and 21 deletions

View file

@ -1628,9 +1628,6 @@ $wgVisualEditorSerializationCacheTimeout = 3600;
// to something like 'https://rest.wikimedia.org/en.wikipedia.org/v1/page/html/' including the
// trailing slash.
//
// VisualEditor will attempt to pre-fetch DNS for RESTBase by requesting '/_preconnect' from the
// host it derives from this URL.
//
// If this is set, the page HTML will be requested from RESTbase. If this is not set, the page HTML
// will be requested from the API, which will send an HTTP request to Parsoid or to RESTbase
// if available.

View file

@ -537,19 +537,6 @@
mw.config.get( 'wgPageContentModel' ) === 'wikitext'
);
// Pre-fetch RESTBase DNS and negotiate TLS.
function restbasePreConnect() {
var url, a = document.createElement( 'a' );
a.href = conf.restbaseUrl;
url = '//' + a.hostname + '/_preconnect';
if ( navigator.sendBeacon ) {
navigator.sendBeacon( url );
} else {
new Image().src = url;
}
}
// Note: Though VisualEditor itself only needs this exposure for a very small reason
// (namely to access init.blacklist from the unit tests...) this has become one of the nicest
// ways to easily detect whether the VisualEditor initialisation code is present.
@ -585,11 +572,6 @@
if ( userPrefEnabled ) {
init.setupSkin();
if ( conf.restbaseUrl ) {
$( window ).load( function () {
setTimeout( restbasePreConnect );
} );
}
}
if ( currentUri.query.venotify ) {