Optimize visitor-facing JavaScript

Created on 3 May 2021, over 4 years ago
Updated 10 June 2025, 2 months ago

Problem/Motivation

  • Disqus JS (the one that comes from Disqus.com) is not the most optimal JS code and I don't think it's getting optimized any time soon. Thus, we should improve anything else that we can improve, e.g. disqus.js in the Disqus module.
  • Not all sites use jQuery these days, mostly because core JS has a ton of new features.
  • Disqus doesn't seem to use much jQuery, so ideally, the dependency on jQuery should be removed.

Proposed resolution

  1. Allow lazy-loading Lazy load / async load Disqus libraries for better performance RTBC .
  2. Once that issue is closed, the dependency on jQuery should be removed.
  3. Possibly, the Disqus comment count and Disqus comment thread JS should be split into 2 files? Thus, sites will only load the code that will actually be used.

If a maintainer promises fast reviews and commits, I'd gladly volunteer to work on this issue to get things done fast :D In that case, feel free to assign the issue to me (Jigarius).

📌 Task
Status

Needs work

Version

2.0

Component

Code

Created by

🇨🇦Canada jigarius Montréal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024