Skip to content

Enable gzip compression in nginx for RDF and JSON content types#290

Merged
namedgraph merged 5 commits intodevelopfrom
fix-nginx-gzip
Apr 11, 2026
Merged

Enable gzip compression in nginx for RDF and JSON content types#290
namedgraph merged 5 commits intodevelopfrom
fix-nginx-gzip

Conversation

@namedgraph
Copy link
Copy Markdown
Member

Summary

  • Enables gzip in the nginx http {} block for all compressible content types served by LDH
  • Covers application/json, application/ld+json, application/rdf+xml, application/sparql-results+json, application/sparql-results+xml, application/trig, application/n-quads, application/n-triples, application/xml, text/turtle, text/css, text/javascript, application/javascript, image/svg+xml
  • Primary motivation: client.xsl.sef.json (11.8MB uncompressed) will compress to ~2-3MB, reducing cold-load transfer by ~75-80%

text/html and text/plain are always compressed by nginx and do not need to be listed.

Test plan

  • Restart nginx and confirm Content-Encoding: gzip on client.xsl.sef.json: curl -sI -H "Accept-Encoding: gzip" https://<host>/static/com/atomgraph/linkeddatahub/xsl/client.xsl.sef.json | grep -i content-encoding
  • Verify transfer size in browser DevTools drops from ~11.8MB to ~2-3MB on cold load
  • Confirm RDF responses (Turtle, JSON-LD, etc.) are also gzip-encoded

🤖 Generated with Claude Code

namedgraph and others added 5 commits April 10, 2026 22:55
Adds gzip_types covering application/json, SPARQL results, RDF serializations
(Turtle, RDF/XML, LD+JSON, TriG, N-Quads, N-Triples), XML, CSS, JS, and SVG.
Primarily reduces client.xsl.sef.json transfer size from ~11.8MB to ~2-3MB.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…r RDF/XML

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… root container

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@namedgraph namedgraph merged commit f33b394 into develop Apr 11, 2026
1 check passed
@namedgraph namedgraph deleted the fix-nginx-gzip branch April 11, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant