{"id":3955,"date":"2026-10-13T08:39:36","date_gmt":"2026-10-13T08:39:36","guid":{"rendered":"https:\/\/nownodes.io\/blog\/?p=3955"},"modified":"2026-10-13T08:39:37","modified_gmt":"2026-10-13T08:39:37","slug":"how-to-enable-gzip-compression-on-rpc-calls","status":"publish","type":"post","link":"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/","title":{"rendered":"How to Enable Gzip Compression on RPC Calls"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Gzip compression shrinks the JSON that a blockchain endpoint sends back to your application, so large responses download faster and burn less bandwidth. You enable it by telling the endpoint your client accepts gzip \u2014 and with most modern tooling, that already happens without you writing a line of extra code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The catch is knowing <em>when<\/em> it helps, <em>which<\/em> clients handle it for you, and how to confirm it&#8217;s actually working. This guide walks through all three, with copy-paste examples for the tools you&#8217;re most likely using.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-gzip-and-what-does-it-do-to-an-rpc-call\">What Is Gzip, and What Does It Do to an RPC Call?<\/h2>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-83-1024x683.png\" alt=\"\" class=\"wp-image-3957\" srcset=\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-83-1024x683.png 1024w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-83-300x200.png 300w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-83-768x512.png 768w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-83.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Gzip is a lossless data-compression format: it makes a payload smaller to send, and the receiving side rebuilds it byte-for-byte on arrival. It&#8217;s built on the DEFLATE algorithm defined in <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc1952\" rel=\"nofollow noopener noreferrer\">RFC 1952<\/a>, and it has been a standard part of the web for decades.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It works especially well on text, and a JSON-RPC response is just text \u2014 repetitive text, full of recurring keys like <code>\"blockNumber\"<\/code>, <code>\"address\"<\/code>, and <code>\"0x\"<\/code> prefixes. That repetition is exactly what gzip exploits, which is why a bulky response can compress down to a fraction of its original size over the wire.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nothing about your data changes. You send the same request, and your code receives the same decoded JSON. Gzip only affects how many bytes travel across the network in between.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"why-compress-rpc-responses-at-all\">Why Compress RPC Responses at All?<\/h2>\n\n\n<p class=\"wp-block-paragraph\">Most RPC traffic is lopsided: your request is tiny, and the response can be enormous. A call like <code>eth_getLogs<\/code> over a wide block range, a <code>debug_traceTransaction<\/code>, or a large batch request can return hundreds of kilobytes or more of JSON.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Shipping that uncompressed has three costs. It&#8217;s slower for the user, especially on a weak mobile connection. It eats bandwidth on both ends. And if you&#8217;re paying for egress or metered requests, it quietly inflates your bill.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Compression attacks all three at once for the price of a little CPU. For a data-heavy backend pulling logs or historical state all day, that trade is almost always worth making.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"who-actually-needs-it\">Who Actually Needs It?<\/h2>\n\n\n<p class=\"wp-block-paragraph\">Anyone moving large or frequent responses benefits most:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Indexers and analytics pipelines<\/strong> that scan logs and historical blocks continuously.<\/li>\n\n\n\n<li><strong>Block explorers and dashboards<\/strong> rendering lots of on-chain data per page.<\/li>\n\n\n\n<li><strong>dApp backends<\/strong> batching many calls or fetching event histories.<\/li>\n\n\n\n<li><strong>Mobile and bandwidth-constrained clients<\/strong>, where every saved kilobyte counts.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Who can skip it? Code that only fires small, fast calls \u2014 think <code>eth_blockNumber<\/code> or a single balance lookup. Those responses are already tiny, and compressing them adds overhead without a meaningful payoff. More on that trade-off below.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"how-gzip-travels-through-an-http-request\">How Gzip Travels Through an HTTP Request<\/h2>\n\n\n<p class=\"wp-block-paragraph\">Gzip rides on a short negotiation built into HTTP. Your client advertises what it can decode, and the server answers with what it chose.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The client sends a request header: <code>Accept-Encoding: gzip<\/code>.<\/li>\n\n\n\n<li>If the server supports it, it compresses the body and replies with <code>Content-Encoding: gzip<\/code>.<\/li>\n\n\n\n<li>The client sees that header and decompresses the body before handing it to your code.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">You can read the full specification of the request side on <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Reference\/Headers\/Accept-Encoding\" rel=\"nofollow noopener noreferrer\">MDN&#8217;s <code>Accept-Encoding<\/code> reference<\/a>. One distinction matters a lot here: this handshake compresses the server&#8217;s <em>response<\/em> \u2014 the big thing you download. Compressing the <em>request body<\/em> you send upward is a separate feature (<code>Content-Encoding<\/code> on your outbound POST) that many endpoints don&#8217;t accept yet, so it&#8217;s usually left alone.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"how-do-you-turn-on-gzip-in-your-code\">How Do You Turn On Gzip in Your Code?<\/h2>\n\n\n<p class=\"wp-block-paragraph\">The honest answer for most stacks: you probably don&#8217;t have to. Here&#8217;s a quick map of who handles it automatically and who needs a nudge.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>HTTP client<\/th><th>Requests gzip by default?<\/th><th>What you do<\/th><\/tr><\/thead><tbody><tr><td>Browser <code>fetch<\/code> (frontend ethers \/ viem)<\/td><td>Yes, automatic<\/td><td>Nothing \u2014 the browser sets the header and decompresses<\/td><\/tr><tr><td>ethers.js v6<\/td><td>Yes<\/td><td>Nothing; it&#8217;s on by default and decoded for you<\/td><\/tr><tr><td>ethers.js v5<\/td><td>No (opt-in)<\/td><td>Pass <code>allowGzip: true<\/code> in the connection options<\/td><\/tr><tr><td>axios (Node)<\/td><td>Yes (decompresses)<\/td><td>Optionally set the header; <code>decompress<\/code> is already true<\/td><\/tr><tr><td>Node 18+ native <code>fetch<\/code><\/td><td>Yes<\/td><td>Nothing; standard encodings are handled for you<\/td><\/tr><tr><td>Node <code>http<\/code> \/ <code>https<\/code><\/td><td>No<\/td><td>Send the header and decompress with <code>zlib<\/code><\/td><\/tr><tr><td>curl<\/td><td>No (opt-in)<\/td><td>Add <code>--compressed<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<h3 class=\"wp-block-heading\" id=\"in-the-browser\">In the Browser<\/h3>\n\n\n<p class=\"wp-block-paragraph\">There&#8217;s nothing to configure, and nothing you <em>can<\/em> configure. Browsers attach <code>Accept-Encoding<\/code> to every request and decompress the response transparently. <code>Accept-Encoding<\/code> is a <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Glossary\/Forbidden_header_name\" rel=\"nofollow noopener noreferrer\">forbidden header name<\/a>, so trying to set it from JavaScript is ignored or throws a &#8220;refused to set unsafe header&#8221; error. Frontend libraries like ethers or viem inherit this behavior for free.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"in-ethersjs-v6-and-v5\">In Ethers.js (v6 and v5)<\/h3>\n\n\n<p class=\"wp-block-paragraph\">In the current <strong>ethers.js v6<\/strong> (6.16.x at the time of writing), gzip is on by default. The underlying <code>FetchRequest<\/code> enables it automatically, and per the <a href=\"https:\/\/docs.ethers.org\/v6\/api\/utils\/fetching\/\" rel=\"nofollow noopener noreferrer\">ethers fetching docs<\/a>, &#8220;the response will automatically be decompressed.&#8221; A plain provider already gets compressed responses:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">js<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import { ethers, FetchRequest } from \"ethers\";\n\n\/\/ Gzip is already requested and decoded for you.\nconst provider = new ethers.JsonRpcProvider(\"https:\/\/eth.nownodes.io\/YOUR_API_KEY\");\n\n\/\/ Only reach for FetchRequest when you need custom headers (e.g. auth).\nconst req = new FetchRequest(\"https:\/\/eth.nownodes.io\/YOUR_API_KEY\");\nreq.setHeader(\"Accept-Encoding\", \"gzip\"); \/\/ default; shown for clarity\nconst explicitProvider = new ethers.JsonRpcProvider(req);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ethers.js v5<\/strong> is the legacy line, and there it&#8217;s opt-in. You pass a connection options object with <code>allowGzip<\/code> set to <code>true<\/code>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">js<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const { ethers } = require(\"ethers\"); \/\/ v5\nconst provider = new ethers.providers.JsonRpcProvider({\n  url: \"https:\/\/eth.nownodes.io\/YOUR_API_KEY\",\n  allowGzip: true,\n});<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re still on v5, this is the one line to add. If you&#8217;re on v6, you already have it.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"with-axios-and-native-fetch-in-node\">With Axios and Native Fetch in Node<\/h3>\n\n\n<p class=\"wp-block-paragraph\">On the server side, axios sets <code>decompress: true<\/code> by default, so it unpacks gzip automatically whenever it sees <code>Content-Encoding: gzip<\/code>. Adding the request header is optional but makes your intent explicit:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">js<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const axios = require(\"axios\");\n\nconst { data } = await axios.post(\n  \"https:\/\/eth.nownodes.io\/YOUR_API_KEY\",\n  { jsonrpc: \"2.0\", id: 1, method: \"eth_getLogs\", params: &#91;\/* filter *\/] },\n  { headers: { \"Accept-Encoding\": \"gzip\" } } \/\/ decompression is already on\n);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Node 18 and newer ship a built-in <code>fetch<\/code> that also requests and decodes standard encodings for you, so a straightforward <code>fetch(url, { method: \"POST\", body })<\/code> already benefits.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"with-raw-node-http-https\">With Raw Node <code>http<\/code> \/ <code>https<\/code><\/h3>\n\n\n<p class=\"wp-block-paragraph\">The low-level modules are the exception: they do <strong>not<\/strong> decompress for you. You send the header yourself and run the response through Node&#8217;s <a href=\"https:\/\/nodejs.org\/api\/zlib.html\" rel=\"nofollow noopener noreferrer\"><code>zlib<\/code><\/a> module:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">js<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const zlib = require(\"node:zlib\");\n\n\/\/ ...after collecting the gzipped response into `buffer`:\nconst json = JSON.parse(zlib.gunzipSync(buffer).toString());<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is rarely worth hand-rolling. If you&#8217;re writing raw requests, switching to axios or native <code>fetch<\/code> removes the manual step entirely.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"checking-it-works-with-curl\">Checking It Works With curl<\/h3>\n\n\n<p class=\"wp-block-paragraph\">curl&#8217;s <code>--compressed<\/code> flag does both jobs at once: it adds <code>Accept-Encoding<\/code> and decompresses the reply. Pair it with <code>-v<\/code> to see the response headers:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -v --compressed https:\/\/eth.nownodes.io\/YOUR_API_KEY \\\n  -X POST -H \"Content-Type: application\/json\" \\\n  --data '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getBlockByNumber\",\"params\":&#91;\"latest\",false]}'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Look for <code>content-encoding: gzip<\/code> in the response headers. If it&#8217;s there, the endpoint compressed the reply. To prove the savings, run the call once with <code>--compressed<\/code> and once without, comparing <code>-w '%{size_download}'<\/code> each time.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"when-gzip-isnt-worth-it\">When Gzip Isn&#8217;t Worth It<\/h2>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-84-1024x683.png\" alt=\"\" class=\"wp-image-3958\" srcset=\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-84-1024x683.png 1024w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-84-300x200.png 300w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-84-768x512.png 768w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-84.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Compression is close to free, but &#8220;close to free&#8221; isn&#8217;t &#8220;always free.&#8221; A few situations where it does little or gets in the way:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Tiny responses.<\/strong> Gzip adds a small header and framing overhead (roughly 18 bytes) plus CPU work. For a one-line response, you can end up even or slightly worse off.<\/li>\n\n\n\n<li><strong>Very high request volume.<\/strong> Compressing and decompressing every response has a real CPU cost at scale, even if it&#8217;s dwarfed by the bandwidth saved in most workloads.<\/li>\n\n\n\n<li><strong>Request-body compression.<\/strong> Gzipping the JSON you <em>send<\/em> is a different feature from gzipping the response you receive, and many endpoints reject compressed inbound bodies. Stick to response compression unless your provider documents inbound support.<\/li>\n\n\n\n<li><strong>WebSocket connections.<\/strong> <code>Content-Encoding<\/code> is an HTTP mechanism. Streaming subscriptions over WebSocket use a separate extension (permessage-deflate) and aren&#8217;t covered by the techniques above.<\/li>\n\n\n\n<li><strong>Double compression.<\/strong> If a CDN or proxy in front of your endpoint already applies gzip, don&#8217;t try to layer it again.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The rule of thumb is simple: let it run by default for anything that returns large JSON, and don&#8217;t lose sleep over the handful of calls where it doesn&#8217;t help.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"getting-a-compressionfriendly-endpoint\">Getting a Compression-Friendly Endpoint<\/h2>\n\n\n<p class=\"wp-block-paragraph\">Gzip is negotiated between your HTTP client and whatever endpoint you point it at, so a reliable, standards-compliant endpoint matters as much as your client config. Running that infrastructure yourself means syncing chains, managing storage, and keeping uptime high \u2014 before you&#8217;ve shrunk a single response.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A managed provider removes that overhead. <a href=\"https:\/\/nownodes.io\">NOWNodes<\/a> offers JSON-RPC, WebSocket, and Data API access across <a href=\"https:\/\/nownodes.io\/nodes\">120+ networks<\/a> with a reported 99.95% uptime, all behind a single API key. You get an HTTPS endpoint per network \u2014 for example <code>https:\/\/eth.nownodes.io\/YOUR_API_KEY<\/code> for <a href=\"https:\/\/nownodes.io\/nodes\/ethereum-eth\">Ethereum<\/a> \u2014 and your client requests gzip over it exactly as shown above.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Point ethers, axios, or curl at the endpoint, keep gzip enabled, and the large responses that cost you the most bandwidth arrive compressed by default.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"the-short-version\">The Short Version<\/h2>\n\n\n<p class=\"wp-block-paragraph\">Enabling gzip on RPC calls is less about flipping a switch and more about knowing it&#8217;s usually already on. Browsers, ethers.js v6, axios, and native Node <code>fetch<\/code> all request and decode gzip for you; ethers v5 needs <code>allowGzip: true<\/code>, and raw <code>http<\/code> needs <code>zlib<\/code>. Verify with <code>curl --compressed<\/code> and the <code>content-encoding: gzip<\/code> header.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Turn it on everywhere that returns big JSON, skip the worry on tiny calls, and you&#8217;ll trim real bandwidth and latency from your heaviest requests for almost no effort.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">FAQ<\/h2>\n\n<h3 class=\"wp-block-heading\" id=\"does-gzip-compression-work-over-websocket-rpc-connections\">Does gzip compression work over WebSocket RPC connections?<\/h3>\n\n\n<p class=\"wp-block-paragraph\">No. Gzip&#8217;s <code>Content-Encoding<\/code> is an HTTP feature and applies to request\/response calls, not persistent streams. WebSocket has its own compression extension, permessage-deflate, which is negotiated separately when the socket opens and isn&#8217;t controlled by <code>Accept-Encoding<\/code>.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"is-brotli-better-than-gzip-for-rpc-responses\">Is Brotli better than gzip for RPC responses?<\/h3>\n\n\n<p class=\"wp-block-paragraph\">Brotli (<code>br<\/code>) often compresses text more tightly than gzip, so for large JSON it can shave off a few extra percent. The trade-off is support: gzip is accepted almost everywhere, while brotli isn&#8217;t guaranteed on every endpoint or client. If both sides support it, requesting <code>Accept-Encoding: br, gzip<\/code> lets the server pick the best option and fall back to gzip.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"will-enabling-gzip-change-how-i-parse-responses\">Will enabling gzip change how I parse responses?<\/h3>\n\n\n<p class=\"wp-block-paragraph\">No. Decompression happens below your application code, so you still receive and parse ordinary JSON. The only time you touch raw compressed bytes is with low-level clients like Node&#8217;s <code>http<\/code> module, where you decompress manually before parsing.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"why-isnt-my-response-getting-smaller-even-with-gzip-enabled\">Why isn&#8217;t my response getting smaller even with gzip enabled?<\/h3>\n\n\n<p class=\"wp-block-paragraph\">Check the response for a <code>content-encoding: gzip<\/code> header first \u2014 if it&#8217;s missing, the endpoint didn&#8217;t compress the reply. Common reasons are a payload too small to benefit, a proxy that stripped the header, or an endpoint that doesn&#8217;t honor the encoding. For tiny responses, a flat size is expected and not a problem.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gzip compression shrinks the JSON that a blockchain endpoint sends back to your application, so large responses download faster and burn less bandwidth. You enable it by telling the endpoint your client accepts gzip \u2014 and with most modern tooling, that already happens without you writing a line of extra code. The catch is knowing [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":3956,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","_lmt_disableupdate":"","_lmt_disable":"","_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[9],"tags":[],"class_list":["post-3955","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general"],"blocksy_meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Enabling Gzip for RPC Calls: Ethers.js, Axios &amp; curl<\/title>\n<meta name=\"description\" content=\"Gzip compression shrinks large JSON-RPC responses. Learn how to enable it in ethers.js, axios, and curl \u2014 and when it actually makes a difference.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Enabling Gzip for RPC Calls: Ethers.js, Axios &amp; curl\" \/>\n<meta property=\"og:description\" content=\"Gzip compression shrinks large JSON-RPC responses. Learn how to enable it in ethers.js, axios, and curl \u2014 and when it actually makes a difference.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/\" \/>\n<meta property=\"og:site_name\" content=\"NOWNodes Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-13T08:39:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-13T08:39:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/nodes_1-97.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u0410nastasia\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@nownodes\" \/>\n<meta name=\"twitter:site\" content=\"@nownodes\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u0410nastasia\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/\"},\"author\":{\"name\":\"\u0410nastasia\",\"@id\":\"https:\/\/nownodes.io\/blog\/#\/schema\/person\/0890ec68e813adecb93c18ee00e1e7a8\"},\"headline\":\"How to Enable Gzip Compression on RPC Calls\",\"datePublished\":\"2026-10-13T08:39:36+00:00\",\"dateModified\":\"2026-10-13T08:39:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/\"},\"wordCount\":1604,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/nownodes.io\/blog\/#organization\"},\"articleSection\":[\"General\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/\",\"url\":\"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/\",\"name\":\"Enabling Gzip for RPC Calls: Ethers.js, Axios & curl\",\"isPartOf\":{\"@id\":\"https:\/\/nownodes.io\/blog\/#website\"},\"datePublished\":\"2026-10-13T08:39:36+00:00\",\"dateModified\":\"2026-10-13T08:39:37+00:00\",\"description\":\"Gzip compression shrinks large JSON-RPC responses. Learn how to enable it in ethers.js, axios, and curl \u2014 and when it actually makes a difference.\",\"breadcrumb\":{\"@id\":\"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/nownodes.io\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"General\",\"item\":\"https:\/\/nownodes.io\/blog\/category\/general\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Enable Gzip Compression on RPC Calls\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/nownodes.io\/blog\/#website\",\"url\":\"https:\/\/nownodes.io\/blog\/\",\"name\":\"NOWNodes Blog\",\"description\":\"Your first-to-go source of development guides, web3 analytics and most recent news about NOWNodes\",\"publisher\":{\"@id\":\"https:\/\/nownodes.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/nownodes.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/nownodes.io\/blog\/#organization\",\"name\":\"NOWNodes Blog\",\"url\":\"https:\/\/nownodes.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nownodes.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2024\/02\/cropped-New-Logo-NN.png\",\"contentUrl\":\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2024\/02\/cropped-New-Logo-NN.png\",\"width\":1164,\"height\":1164,\"caption\":\"NOWNodes Blog\"},\"image\":{\"@id\":\"https:\/\/nownodes.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/twitter.com\/nownodes\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/nownodes.io\/blog\/#\/schema\/person\/0890ec68e813adecb93c18ee00e1e7a8\",\"name\":\"\u0410nastasia\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nownodes.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1de24ab8dcdd7ec30f6adaf78b56bc1eda421f87575b7e103c8fc3fc4420e833?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1de24ab8dcdd7ec30f6adaf78b56bc1eda421f87575b7e103c8fc3fc4420e833?s=96&d=mm&r=g\",\"caption\":\"\u0410nastasia\"},\"url\":\"https:\/\/nownodes.io\/blog\/author\/nasty-nownodes\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Enabling Gzip for RPC Calls: Ethers.js, Axios & curl","description":"Gzip compression shrinks large JSON-RPC responses. Learn how to enable it in ethers.js, axios, and curl \u2014 and when it actually makes a difference.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/","og_locale":"en_US","og_type":"article","og_title":"Enabling Gzip for RPC Calls: Ethers.js, Axios & curl","og_description":"Gzip compression shrinks large JSON-RPC responses. Learn how to enable it in ethers.js, axios, and curl \u2014 and when it actually makes a difference.","og_url":"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/","og_site_name":"NOWNodes Blog","article_published_time":"2026-10-13T08:39:36+00:00","article_modified_time":"2026-10-13T08:39:37+00:00","og_image":[{"width":2400,"height":1200,"url":"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/nodes_1-97.jpg","type":"image\/jpeg"}],"author":"\u0410nastasia","twitter_card":"summary_large_image","twitter_creator":"@nownodes","twitter_site":"@nownodes","twitter_misc":{"Written by":"\u0410nastasia","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/#article","isPartOf":{"@id":"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/"},"author":{"name":"\u0410nastasia","@id":"https:\/\/nownodes.io\/blog\/#\/schema\/person\/0890ec68e813adecb93c18ee00e1e7a8"},"headline":"How to Enable Gzip Compression on RPC Calls","datePublished":"2026-10-13T08:39:36+00:00","dateModified":"2026-10-13T08:39:37+00:00","mainEntityOfPage":{"@id":"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/"},"wordCount":1604,"commentCount":0,"publisher":{"@id":"https:\/\/nownodes.io\/blog\/#organization"},"articleSection":["General"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/","url":"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/","name":"Enabling Gzip for RPC Calls: Ethers.js, Axios & curl","isPartOf":{"@id":"https:\/\/nownodes.io\/blog\/#website"},"datePublished":"2026-10-13T08:39:36+00:00","dateModified":"2026-10-13T08:39:37+00:00","description":"Gzip compression shrinks large JSON-RPC responses. Learn how to enable it in ethers.js, axios, and curl \u2014 and when it actually makes a difference.","breadcrumb":{"@id":"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/nownodes.io\/blog\/how-to-enable-gzip-compression-on-rpc-calls\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/nownodes.io\/blog"},{"@type":"ListItem","position":2,"name":"General","item":"https:\/\/nownodes.io\/blog\/category\/general"},{"@type":"ListItem","position":3,"name":"How to Enable Gzip Compression on RPC Calls"}]},{"@type":"WebSite","@id":"https:\/\/nownodes.io\/blog\/#website","url":"https:\/\/nownodes.io\/blog\/","name":"NOWNodes Blog","description":"Your first-to-go source of development guides, web3 analytics and most recent news about NOWNodes","publisher":{"@id":"https:\/\/nownodes.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nownodes.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/nownodes.io\/blog\/#organization","name":"NOWNodes Blog","url":"https:\/\/nownodes.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nownodes.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2024\/02\/cropped-New-Logo-NN.png","contentUrl":"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2024\/02\/cropped-New-Logo-NN.png","width":1164,"height":1164,"caption":"NOWNodes Blog"},"image":{"@id":"https:\/\/nownodes.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/twitter.com\/nownodes"]},{"@type":"Person","@id":"https:\/\/nownodes.io\/blog\/#\/schema\/person\/0890ec68e813adecb93c18ee00e1e7a8","name":"\u0410nastasia","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nownodes.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1de24ab8dcdd7ec30f6adaf78b56bc1eda421f87575b7e103c8fc3fc4420e833?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1de24ab8dcdd7ec30f6adaf78b56bc1eda421f87575b7e103c8fc3fc4420e833?s=96&d=mm&r=g","caption":"\u0410nastasia"},"url":"https:\/\/nownodes.io\/blog\/author\/nasty-nownodes"}]}},"modified_by":"\u0410nastasia","_links":{"self":[{"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/posts\/3955","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/comments?post=3955"}],"version-history":[{"count":1,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/posts\/3955\/revisions"}],"predecessor-version":[{"id":3959,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/posts\/3955\/revisions\/3959"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/media\/3956"}],"wp:attachment":[{"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/media?parent=3955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/categories?post=3955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/tags?post=3955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}