litespeedtech / litespeedtech/lscache_wp
Inline JS Not Being Delayed When Included in the "JS Delayed Includes"Setting
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 257
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
I created a support thread on WordPress.org but the person responding there wasn't very helpful and doesn't seem like they understand my issue and/or how the plugin works. But perhaps I am wrong. So I'm coming here in hopes that I can get some clarification/confirmation on things. Here are the steps to reproduce:
1) I have set the "Load JS Deferred" option to "Deferred".
2) I am including a linked script in the "JS Delayed Includes" setting. It gets properly delayed.
3) I am including an inline script in the "JS Delayed Includes" setting. It does not get delayed and remains deferred.
After looking at the plugin, there appears to be a missing conditional check for inline JS. When I add that check, the inline JS is properly delayed just like the linked JS files. Here is a video showing the issue:
https://share.cleanshot.com/qcCP9zfq
The support person on WP.org says you can't use deferred and delayed together. But that seems to be false as I am already able to use deferred and then pick and choose linked scripts which are to be delayed. That is already working. The issue simply seems to be that it doesn't work with inline JS.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the plugin code that handles the "JS Delayed Includes" setting and compare its linked-script and inline-script paths. Reproduce the reported deferred and delayed configurations, then verify that matching inline scripts are delayed consistently with linked scripts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php, wordpress
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100