-
-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Labels
GSoCContributed in the context of the Google Summer of CodeContributed in the context of the Google Summer of CodetechnicalTechnical issues on the websiteTechnical issues on the website
Description
Page URL
What is wrong?
moment.js (~17KB) is loaded unconditionally on every page of the website via _includes/head.html (line 101), but it is only ever used in one place: _includes/algolia.html (line 20), to format a date string in search results.
Current behaviour: Every visitor downloads moment.js regardless of whether they interact with the search widget at all.
Expected behaviour: moment.js should only be loaded as a dependency of the search widget (algolia.html), not as a global resource in <head>.
Proposed fix:
- Remove the
<script src="...moment.min.js">tag from _includes/head.html - Add it at the top of _includes/algolia.html, directly before the inline script that consumes it
This is a one-file-change with zero risk of breakage since moment has exactly one call site.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
GSoCContributed in the context of the Google Summer of CodeContributed in the context of the Google Summer of CodetechnicalTechnical issues on the websiteTechnical issues on the website