Serve local UI static files gzip-compressed

オープン
#437 コメント 0 件 リアクション 0 件 担当者 2 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@lePereT がすでに取り組んでいます。

2026年12月1日 から。

評価

この issue はまだ評価されていません。

説明

enhancement

Problem

src/services/ui/http/static.lua serves UI files uncompressed. The current local UI bundle from local-ui dev is:

File Raw gzip -9
JS 151 KB 55 KB
CSS 47 KB 8 KB

That's about 3x more bytes than necessary on every uncached page load, which matters most on weak Wi-Fi and older devices.

Proposal

  • Compress at build time. The build writes pre-compressed .gz copies next to the static files, so the box does no compression work at run time.
  • Choose per request. static.lua serves the .gz copy with Content-Encoding: gzip and Vary: Accept-Encoding when the request's Accept-Encoding allows gzip. Otherwise it serves the plain file.
  • Keep the existing headers right. Content type and caching headers must still describe the original file.

Done when

  • A browser receives gzip responses for JS, CSS and HTML.
  • A request without gzip in Accept-Encoding gets the plain file.
  • Unit tests cover both paths and a missing .gz copy.
主要言語
Lua
スター
1
フォーク
0
平均マージ
1日 8時間
マージ済み PR(30日)
24

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jangala-dev/devicecode-lua のほかの issue

jangala-dev/devicecode-lua の issue をすべて見る

似ている issue

Lua の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。