https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36531

            Bug ID: 36531
           Summary: Koha should serve text/javascript compressed, like
                    application/javascript is
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
        Depends on: 36463

Discovered via bug 36463, while we compress application/javascript, which is
how we serve static .js files (though that may well be OS-dependent, coming
from /etc/mime.types), we don't compress text/javascript, which is what
output_with_http_headers produces when you ask for 'js'. That's actually
currently the correct choice, since in May 2022 RFC 9239 obsoleted RFC 4329
which from 2006 to 2022 said that application/javascript was correct.

Not many things seem to actually use output_with_http_headers for js (and most
of them seem to actually mean json rather than js), but one huge one does: the
initial load of svc/cataloguing/framework for the advanced cataloging editor
loads an uncompressed 1.9MB of js (json, but because it's loaded through
RequireJS, it winds up loaded as js rather than json, and serving it as json
would produce an annoying browser warning) which compressed is a lovely 176KB.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36463
[Bug 36463] We should compress our JSON responses (gzip deflate mod_deflate
application/json)
-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to