Moment JS RemovalCompleted
We took this feedback and this has been removed in a recent version of AC in favor of some native browser tooling (which means it wont work in IE11). We agreed the speed tradeoff highlighted here was not worth the IE11 support since it's not a modern browser and is not utilized very often. Times will simply fallback to server times on IE11 browsers.
Thank you as always for your feedback and support!
I've noticed this on stores before as well, and I've been curious as to its application as well, for the same reason. As it appears to be loaded separately from the theme files (and thus can't be removed as-is), I would imagine it's doing something important - but if that's not the case, perhaps it could be removed? It would be a couple HTTP requests less at least. If it's for the blog posts (which seems to be the most apt reason), maybe the scripts could be set to only be loaded on blog pages or when blog widgets are apparent on a page?1
It's also pulling from a different CDN, so a site has to have preconnects for three different places otherwise there is a huge slowdown with an SSL handshake.0
I'm guessing moment is for the user account area pages, either way I'd be surprised if it slows down your site noticably, moment is a notoriously small and well behaved package. My two cents.0
Moment isn't notoriously small, it is quite the opposite especially since it is also pulling in the i18n. It actually adds quite a bit of time to Light House.0
Moment is used in AC sites to define and set the appropriate time-zone for a browser session. You'll see it in both Local and Session Storage in the Dev Console. Likely for user session cookies.0
Please sign in to leave a comment.