Enable gzip compression in nginx for RDF and JSON content types#290
Merged
namedgraph merged 5 commits intodevelopfrom Apr 11, 2026
Merged
Enable gzip compression in nginx for RDF and JSON content types#290namedgraph merged 5 commits intodevelopfrom
namedgraph merged 5 commits intodevelopfrom
Conversation
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
added a commit
that referenced
this pull request
Apr 11, 2026
* Enable gzip compression in nginx for RDF and JSON content types 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> * Add gzip HTTP tests for SEF file and RDF/XML response Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix gzip HTTP tests: use -D - to avoid binary body, add owner cert for RDF/XML Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * nginx conf fix * Fix gzip RDF/XML test: create item and append data instead of testing root container Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gzipin the nginxhttp {}block for all compressible content types served by LDHapplication/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+xmlclient.xsl.sef.json(11.8MB uncompressed) will compress to ~2-3MB, reducing cold-load transfer by ~75-80%text/htmlandtext/plainare always compressed by nginx and do not need to be listed.Test plan
Content-Encoding: gziponclient.xsl.sef.json:curl -sI -H "Accept-Encoding: gzip" https://<host>/static/com/atomgraph/linkeddatahub/xsl/client.xsl.sef.json | grep -i content-encoding🤖 Generated with Claude Code