【スポンサーリンク】

LiteSpeed CacheがアップデートされてJQueryが遅延読込みされている 【ただしサイトスピードは高速化】

ほとんどタイトルが全てなんですが、LiteSpeed Cacheプラグインのアップデートについてメモしておきます。

プラグインのアップデート一つでこんなに変わるんですね。

\記事が役に立ったらシェアしてね/
【スポンサーリンク】

LiteSpeed Cacheのバージョンが3.5.0.1にアップグレードされた

LiteSpeed CacheはWordPressのプラグインで、mixhostサーバーではサイトスピード向上のために利用することができます。

最近(2020年9月29日)バージョンが3.4.2→から3.5にアップデートされました。

そこで、よかったことと困ったことが……

サイトスピードのスコアが86になりました

まず、よかったことはサイトスピードがとてもはやくなったことです。

PageSpeed Insightでの比較

PageSpeed Insightsでのスコアが、モバイルで「86」になりました。ついこないだ(4日前)測ったときが55だったので、劇的な向上です。

インラインのJavascriptが実行されません

一方で悪いことも。

インラインのJavascriptが動かなくなっているものがあります。

コンソールのエラーを見てみると、

Chromeのコンソール画面でのスクリプトエラー

Uncaught ReferrenceError: $ is not defined

Uncaught ReferrenceError: jQuery is not defined

これはJSの遅延読込の機能の変更が原因と考えられます。

JQueryも遅延読込の対象になってしまっているようで、インラインスクリプトからJQueryを呼び出しても反応しなくなってしまいました💦

この記事のマウスの位置で動作するところでJQueryを使っているのですが、Javascriptが動作していません。

LiteSpeed Cacheの設定項目が減っています

LiteSpeed Cacheの設定を見てみると、JS設定の項目が減っているんですよね。

LiteSpeed Cacheのページ最適化のJS設定の画面

以前のスクリーンショットを見てみましょう。

インラインJSの読み込み設定

「インラインJSの読み込み」と「JQueryを除外する」の項目が減っているんです。

どうしてなくなったんでしょう?

すぐに復活するかもしれませんが…

LiteSpeed Cacheの更新内容を読んでみると

ということで一次情報にあたると、更新内容は下記の通りです。

LiteSpeed Cache の更新内容

3.5 – Sep 29 2020

  • Page Optimize Refactored CSS/JS optimization.
  • Page Optimize CSS and JS Combine now each save to a single file without memory usage issues.
  • CSS Inline CSS Minify is now a part of CSS Minify, and will respect thr original priorities. (thanks to @galbaras)
  • JS JS Combine now generates a single JS file in the footer. (Special thanks to @ankit)
  • JS JS Combine now combines external JS files, too. (Thanks to @ankit)
  • JS JS Deferred Excludes now uses the original path/filename as keywords instead of the minified path/filename, when JS Minify is enabled.
  • JS JS Combine now combines inline JS, too.
  • JS JS Excludes may now be used for inline JS snippet.
  • Page Optimize Inline CSS Minify and Max Combined File Size retired due to changes listed above.
  • CSS Combined CSS Priority retired due to changes listed above.
  • JS Exclude JQuery, Combined JS Priority, Load Inline JS Deferred, and Inline JS Deferred Excludes retired due to changes listed above.
  • JS Predefined data file data/js_excludes.txt now available for JS Excludes.
  • ESI Predefined data file data/esi.nonces.txt now available for ESI Nonces.
  • ESI Remote Fetch ESI Nonces functionality retired.
  • API Added support for new litespeed_esi_nonces filter.
  • Object Object Cache will not try to reconnect after failure to connect in a single process.
  • CCSS Remote read CSS will add the scheme if it is missing from the URL.
  • CCSS CSS will no longer be prepared for a URL if 404 result is detected.
  • CCSS Fixed most failures caused by third party CSS syntax errors.
  • CCSS Remote read CSS will fix the scheme if the URL doesn’t have it.
  • CCSS Excluded 404 when preparing CSS before request.
  • CCSS Adjusted CCSS timeout from 180 seconds to 30 seconds.
  • Image Optimize Fixed the delete attachment database error that occurred when not using the image optimization service yet.
  • Media Added iOS 14 WebP support.
  • Data Fixed database creation failure for MySQL v8.
  • Cloud Error code err_key will clear the domain key in order to avoid duplicate invalid requests.
  • Network Fixed issue with object cache password file storage that occurred when resaving the settings. (#302358)
  • Misc Fixed IP detect compatibility w/ Apache.
  • GUI Fixed the description for Do Not Cache Categories.
  • Preload Upgraded Instant Click to a new stable preload library. (@stasonua0)

Javascript関連の部分だけを見てみます。

  • JS JS Combine now generates a single JS file in the footer. (Special thanks to @ankit)
  • JS JS Combine now combines external JS files, too. (Thanks to @ankit)
  • JS JS Deferred Excludes now uses the original path/filename as keywords instead of the minified path/filename, when JS Minify is enabled.
  • JS JS Combine now combines inline JS, too.
  • JS JS Excludes may now be used for inline JS snippet.
  • Page Optimize Inline CSS Minify and Max Combined File Size retired due to changes listed above.
  • CSS Combined CSS Priority retired due to changes listed above.
  • JS Exclude JQuery, Combined JS Priority, Load Inline JS Deferred, and Inline JS Deferred Excludes retired due to changes listed above.
  • JS Predefined data file data/js_excludes.txt now available for JS Excludes.

これをグーグル翻訳にかけてみると

  • JS JS Combineは、フッターに単一のJSファイルを生成するようになりました。 (@ankitに感謝します)
  • JS JS Combineは、外部JSファイルも結合するようになりました。 (@ankitに感謝します)
  • JS JS Deferred Excludesは、JS Minifyが有効になっている場合に、縮小されたパス/ファイル名ではなく、元のパス/ファイル名をキーワードとして使用するようになりました。
  • JS JS Combineは、インラインJSも結合するようになりました。
  • JS JSExcludesをインラインJSスニペットに使用できるようになりました。
  • 上記の変更により、ページ最適化インラインCSS最小化および最大結合ファイルサイズが廃止されました。
  • 上記の変更により、CSS結合CSS優先度は廃止されました。
  • JS Exclude JQuery、Combined JS Priority、Load Inline JS Deferred、およびInline JS Deferred上記の変更により、廃止されたものを除外します。
  • JS定義済みデータファイルdata / js_excludes.txtがJSExcludesで利用可能になりました

このあたりですね。

JS Exclude JQuery、Combined JS Priority、Load Inline JS Deferred、およびInline JS Deferred上記の変更により、廃止されたものを除外します。

もう少し時間をかけて研究してみます。

ということで、まだ中途半端な状態です。もし、ご存知のかたはTwitterでお知らせいただけると、嬉しいです。

【追記】ver. 3.5.0.2 一時的に戻っています(2020年10月1日)

様子を見ていたら、さっそく修正されました。JQueryが動いています。

すぐにマイナーアップデートがありました。

更新情報をみてみましょう。

LiteSpeed Cacheの更新履歴

この修正では一時的に元に戻しています。バージョン3.4.2のコードと同じもので、明日 最終調整してバージョン3.5.1をリリースします。

あらら、戻っているんですね。

確かに、サイトスピードも元通りです。

ということで、もう少し様子見です。

【追記2】Tomorrowは必ずしも翌日ではない?(2020年10月3日)

続報です。ver 3.5.1、なかなかリリースされません。予想以上に大変なようです。

LiteSpeed Cacheの更新履歴(2020-10-03現在)
「明日更新する」という履歴が、「2日前」になる矛盾

期待して待ちたいと思います。

【追記3】2週間経ちましたが修正は難航……(2020年10月14日)

一応、定期的にウォッチしているんですが、まだ更新がありません。

かなり設計の根幹に関わる問題なんでしょうね。

【追記4】ついにver 3.5.1がリリースされました。(2020年11月2日)

無事に最新版がリリースされました。

2020年10月20日にLiteSpeed Cache 3.5.1が、2020年10月27日にはLiteSpeed Cache 3.5.2が公開されました。

お読みいただきありがとうございました!

QRコードを読み込むと、関連記事を確認できます。
LiteSpeed CacheがアップデートされてJQueryが遅延読込みされている 【ただしサイトスピードは高速化】
【スポンサーリンク】
タイトルとURLをコピーしました