-
Notifications
You must be signed in to change notification settings - Fork 677
Fix issue #283, add dns-prefetch, preconnect for editor iframe #4455
Fix issue #283, add dns-prefetch, preconnect for editor iframe #4455
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4455 +/- ##
=======================================
Coverage 94.71% 94.71%
=======================================
Files 260 260
Lines 22805 22805
Branches 1674 1674
=======================================
Hits 21600 21600
Misses 981 981
Partials 224 224 Continue to review full report at Codecov.
|
kuma/wiki/jinja2/wiki/base.html
Outdated
{% block extrahead %} | ||
<link rel="dns-prefetch" href="https://interactive-examples.mdn.mozilla.net" pr="0.75" /> | ||
<link rel="preconnect" href="https://interactive-examples.mdn.mozilla.net" pr="0.75" /> | ||
{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I felt confident that this is the correct file but, now I am not so sure. When I look at a page such as http://127.0.0.1:8000/en-US/docs/Experiment:InteractiveEditor/Array.prototype.reduce()
I do not see the link
elements in the header :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because it is overridden in document.html
, which is a better place for this code:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jwhitlock Will update the PR
Do we think there are any downsides to adding it to all pages? I think it is possible to include the code only if the interactive examples are on the page. We do some custom configuration on the kuma side in response to the existence of the |
@stephaniehobson That would be great, as long as it is not injected with JS. I cannot find the doc now, but I remember recently hearing something about Chrome not behaving predictably if you inject these tags with JS. I will try and find the reference to it. Perhaps it is under x condition which does not apply here. |
Yes! That's it exactly. Great detective work :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good now that John's changes are integrated. My comments can be acted on if we see performance problems.
Adds
dns-prefetch
andpreconnect
for the editoriframe
to test the performance impact.