Skip to content

Commit 4448b37

Browse files
committed
Perform head request rather than request entire resource
1 parent 01e433a commit 4448b37

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/_static/javascripts/version_dropdown.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ function href(url, path) {
1111
url += "/" + path;
1212

1313
// If a versioned resource exists, return the resource's URL; otherwise, return a default URL:
14-
return fetch(url).then(onResponse).catch(onError);
14+
const opts = {
15+
'method': 'HEAD'
16+
};
17+
return fetch(url, opts).then(onResponse).catch(onError);
1518

1619
/**
1720
* Callback invoked upon successfully resolving a resource.

0 commit comments

Comments
 (0)