{"id":15777,"date":"2026-11-14T07:50:00","date_gmt":"2026-11-14T06:50:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/blog\/?p=15777"},"modified":"2026-10-26T12:18:52","modified_gmt":"2026-10-26T11:18:52","slug":"which-image-format-a-browser-receives-checking-format-selection-and-cache-rules","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/","title":{"rendered":"Which Image Format a Browser Receives: Checking Format Selection and Cache Rules"},"content":{"rendered":"<p>A server can return different image formats at the same URL. The request header <code>Accept<\/code> expresses media-type preferences; the response header <code>Vary<\/code> helps caches select a suitable stored response. These are related mechanisms, but neither a different content type nor a missing header proves that visitors received a broken image.<\/p>\n<p>A historical check of twenty front pages on 6 September 2026 recorded 1,345 image entries and sampled 76 image URLs. The saved results remain useful, but the original interpretation overstated the method: the implementation compared a GET request with a HEAD request, not two otherwise identical GET requests. GET requests the response body as well as headers; HEAD requests the headers without the body. The findings below distinguish recorded values from conclusions that require a new controlled test.<\/p>\n<figure class=\"lw-diagram\"><img decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/dia-15777-imageaccept-20261025.png\" width=\"1120\" height=\"580\" loading=\"lazy\" alt=\"Historical sample: twenty pages, 76 image URLs, fourteen media-type differences in a GET\/HEAD comparison, 783 incomplete dimension pairs.\"><figcaption>Saved results from 6 September 2026; method differences prevent an isolated Accept-based conclusion.<\/figcaption><\/figure>\n<h2>What the historical sample actually recorded<\/h2>\n<p>Fourteen of the 76 pairs had different declared media types. Six New York Times samples reported WebP versus JPEG with <code>Vary: Accept<\/code>. Six Zeit samples reported WebP versus JPEG without a recorded Vary value; two Onet samples reported AVIF versus PNG without one. The remaining 62 pairs had the same declared media type. This does not establish identical file contents.<\/p>\n<p>The requests differed in method as well as Accept. The alternative request also used <code>Accept: image\/*<\/code>, which permits AVIF and WebP rather than modelling a browser without those formats. Consequently, the fourteen differences are leads for a follow-up test, not fourteen proven cases of Accept-based negotiation. The saved data contains summaries, not both response bodies and complete raw headers.<\/p>\n<h2>How a more useful comparison works<\/h2>\n<p>A controlled comparison uses GET for both requests, the same URL and matching options apart from Accept. A baseline request can explicitly exclude AVIF and WebP with <code>q=0<\/code>; a preference such as <code>image\/*<\/code> does not exclude either format. Accept still expresses a request preference: the actual response needs checking.<\/p>\n<p>Useful evidence includes the final URL, status, declared media type, actual file format, byte count, body hash and complete response headers. Equal type and length do not prove equal bytes. Different bytes can also reflect a changing image, CDN behaviour or request timing. Repeated comparisons and, where available, server configuration provide stronger evidence about the cause.<\/p>\n<h2>Vary controls reuse, not permission to store<\/h2>\n<p>When a cacheable response is selected according to Accept, <code>Vary: Accept<\/code> normally communicates that selection criterion. A cache cannot simply reuse that stored response for a request with a non-matching Accept value. HTTP permits normalization when comparing field values; storing a separate copy for every literal spelling is not an unavoidable rule.<\/p>\n<p>Whether storage and reuse are allowed also depends on cache controls, freshness and the cache configuration. Missing Vary can create an incorrect-reuse risk, but the historical sample did not demonstrate a faulty CDN response. Restrictions such as <code>no-store<\/code> and a deliberately configured cache key change the assessment. <code>Vary: *<\/code> prevents direct reuse without validation.<\/p>\n<p>The header needs token-based parsing. <code>Vary: Accept-Encoding<\/code> concerns content encoding and is not equivalent to <code>Vary: Accept<\/code>. An implementation that merely searches for the substring <code>accept<\/code> can confuse the two.<\/p>\n<h2>A verified lesson from the checker<\/h2>\n<p>An older local implementation passed the requested header in an option named <code>accept<\/code>. The shared request library expects <code>kopfzeilen<\/code>. Comparing those source files verifies the interface mismatch; the intended header was not passed through that option. A test therefore needs to inspect the outgoing request as well as the simulated response. Identical responses alone do not rule out negotiation.<\/p>\n<h2>Dimensions, loading and alternative text<\/h2>\n<p>The saved markup analysis counted 783 of 1,345 image entries with at least one missing or invalid numeric dimension. This is not a count of images missing both width and height. Six sampled pages had valid dimensions for every detected image. On Heise, 423 of 426 entries lacked a complete valid pair.<\/p>\n<p>Correct <code>width<\/code> and <code>height<\/code> help reserve the aspect ratio before an image loads. CSS can also reserve suitable space. Missing attributes therefore identify a review point, not a measured layout shift. Cumulative Layout Shift measures how much visible content unexpectedly moves on the page. Measuring it requires observing the rendered page.<\/p>\n<p>The figure 762 is another heuristic: these entries appeared after the first three images in source order and did not carry <code>loading=\"lazy\"<\/code>. No viewport or CSS layout was measured. Source order cannot determine visibility, and an important initial-view image should not be delayed merely because it is the fourth image in HTML.<\/p>\n<p>Twenty-seven entries lacked an alt attribute. Empty <code>alt=\"\"<\/code> can be appropriate for purely decorative images or images whose information is already provided nearby. Whether that choice is appropriate depends on the image&#8217;s purpose; informative and functional images need a suitable accessible alternative.<\/p>\n<h2>What was outside the sample<\/h2>\n<p>The checker selected at most six distinct image URLs per page from detected markup. This did not cover every CSS background, script-created image or responsive candidate actually chosen by a browser. Six samples do not establish the behaviour of an entire delivery service.<\/p>\n<p>Three records contained no detected images: Stack Overflow returned 429, Allegro returned 403, and the recorded Bund response yielded no image entries. These cases do not prove that those pages normally contain no images or that two rely on JavaScript. A refused or rate-limited request describes that attempted access, not a complete browser visit.<\/p>\n<h2>A bounded comparison for one URL<\/h2>\n<p>The following Bash example uses curl 8.4 or later, <code>file<\/code> and GNU coreutils. The example URL is a placeholder. Both requests are GETs, redirects remain HTTPS, and each download is limited to 10 MiB and 30 seconds. Output remains in a newly created temporary directory for inspection.<\/p>\n<figure style=\"--cbb-digits:2\" class=\"cbb cbb--wrap cbb--numbers wp-block-code-beautifier-block-code\" data-lang=\"bash\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Shell<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" data-cbb-done=\"Copied\" data-cbb-failed=\"Press Ctrl+C to copy\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\" aria-live=\"polite\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\"><code class=\"cbb-code language-bash\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-comment\">#!\/usr\/bin\/env bash<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-keyword\">set<\/span> <span class=\"cbb-attr\">-euo<\/span> pipefail\n<\/span><span class=\"cbb-line\">url=<span class=\"cbb-string\">'https:\/\/example.com\/image.png'<\/span>\n<\/span><span class=\"cbb-line\">out=<span class=\"cbb-variable\">$(<\/span>mktemp <span class=\"cbb-attr\">-d<\/span>)\n<\/span><span class=\"cbb-line\"><span class=\"cbb-function\">printf<\/span> <span class=\"cbb-string\">'Output: %s\\n'<\/span> <span class=\"cbb-string\">\"<\/span><span class=\"cbb-variable\">$out<\/span><span class=\"cbb-string\">\"<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-keyword\">for<\/span> variant <span class=\"cbb-keyword\">in<\/span> modern baseline<span class=\"cbb-operator\">;<\/span> <span class=\"cbb-keyword\">do<\/span>\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-keyword\">if<\/span> &#91; <span class=\"cbb-string\">\"<\/span><span class=\"cbb-variable\">$variant<\/span><span class=\"cbb-string\">\"<\/span> = modern &#93;<span class=\"cbb-operator\">;<\/span> <span class=\"cbb-keyword\">then<\/span>\n<\/span><span class=\"cbb-line\">    accept=<span class=\"cbb-string\">'image\/avif,image\/webp,image\/jpeg,image\/png;q=0.8,*\/*;q=0'<\/span>\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-keyword\">else<\/span>\n<\/span><span class=\"cbb-line\">    accept=<span class=\"cbb-string\">'image\/jpeg,image\/png,image\/avif;q=0,image\/webp;q=0,*\/*;q=0'<\/span>\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-keyword\">fi<\/span>\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-function\">curl<\/span> <span class=\"cbb-attr\">--silent<\/span> <span class=\"cbb-attr\">--show-error<\/span> <span class=\"cbb-attr\">--fail<\/span> <span class=\"cbb-attr\">--location<\/span> \\\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-attr\">--proto<\/span> <span class=\"cbb-string\">'=https'<\/span> <span class=\"cbb-attr\">--proto-redir<\/span> <span class=\"cbb-string\">'=https'<\/span> <span class=\"cbb-attr\">--max-redirs<\/span> <span class=\"cbb-number\">3<\/span> \\\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-attr\">--connect-timeout<\/span> <span class=\"cbb-number\">10<\/span> <span class=\"cbb-attr\">--max-time<\/span> <span class=\"cbb-number\">30<\/span> <span class=\"cbb-attr\">--max-filesize<\/span> <span class=\"cbb-number\">10485760<\/span> \\\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-attr\">-H<\/span> <span class=\"cbb-string\">\"Accept: <\/span><span class=\"cbb-variable\">$accept<\/span><span class=\"cbb-string\">\"<\/span> <span class=\"cbb-attr\">-D<\/span> <span class=\"cbb-string\">\"<\/span><span class=\"cbb-variable\">$out<\/span><span class=\"cbb-string\">\/<\/span><span class=\"cbb-variable\">$variant<\/span><span class=\"cbb-string\">.headers\"<\/span> \\\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-attr\">-o<\/span> <span class=\"cbb-string\">\"<\/span><span class=\"cbb-variable\">$out<\/span><span class=\"cbb-string\">\/<\/span><span class=\"cbb-variable\">$variant<\/span><span class=\"cbb-string\">.body\"<\/span> \\\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-attr\">-w<\/span> <span class=\"cbb-string\">\"<\/span><span class=\"cbb-variable\">$variant<\/span><span class=\"cbb-string\"> status=%{http_code} type=%{content_type} url=%{url_effective}\\n\"<\/span> \\\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-string\">\"<\/span><span class=\"cbb-variable\">$url<\/span><span class=\"cbb-string\">\"<\/span>\n<\/span><span class=\"cbb-line\">  file <span class=\"cbb-attr\">--mime-type<\/span> <span class=\"cbb-string\">\"<\/span><span class=\"cbb-variable\">$out<\/span><span class=\"cbb-string\">\/<\/span><span class=\"cbb-variable\">$variant<\/span><span class=\"cbb-string\">.body\"<\/span>\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-function\">wc<\/span> <span class=\"cbb-attr\">-c<\/span> &lt; <span class=\"cbb-string\">\"<\/span><span class=\"cbb-variable\">$out<\/span><span class=\"cbb-string\">\/<\/span><span class=\"cbb-variable\">$variant<\/span><span class=\"cbb-string\">.body\"<\/span>\n<\/span><span class=\"cbb-line\">  sha256sum <span class=\"cbb-string\">\"<\/span><span class=\"cbb-variable\">$out<\/span><span class=\"cbb-string\">\/<\/span><span class=\"cbb-variable\">$variant<\/span><span class=\"cbb-string\">.body\"<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-keyword\">done<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-function\">printf<\/span> <span class=\"cbb-string\">'Full response headers: %s\/*.headers\\n'<\/span> <span class=\"cbb-string\">\"<\/span><span class=\"cbb-variable\">$out<\/span><span class=\"cbb-string\">\"<\/span><\/span><\/code><\/pre><\/figure>\n<p>The header files retain redirect responses as well as the final response. Assessment needs the final response&#8217;s Vary, Cache-Control and any ETag, alongside the printed status and final URL. <code>file<\/code> is a format-detection aid, not a complete image-decoder test. Repeated tests are needed before attributing a difference to Accept alone.<\/p>\n<p>The <a href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/image-delivery-format-negotiation-auditor\/\">Image Delivery and Format Negotiation Auditor<\/a> offers a page-level starting point. The implementation reviewed for this article still uses the GET\/HEAD comparison and the source-order heuristic described above; its output is not equivalent to the two-GET example. Its Vary check also searches for a substring, so Accept-Encoding can be misclassified. These limitations require checking before treating a result as confirmed negotiation or a caching fault.<\/p>\n<div class=\"lw-faq\"><h2>Questions and answers<\/h2><h3>Can modern formats use separate URLs?<\/h3><p>Yes. A picture element can offer typed sources and an img fallback. Browser selection also considers media conditions, responsive candidates and display requirements. If each URL is configured to return a fixed format, choosing between those URLs avoids Accept-based format variation at that address. Other reasons for Vary can still exist.<\/p><h3>Does every image after the first three need lazy loading?<\/h3><p>No. The rendered layout and the initial viewport matter. Below-the-fold images can benefit from deferred loading; initially visible images, especially the likely Largest Contentful Paint image, should not be delayed by a source-order rule.<\/p><\/div>\n<div class=\"lw-quellen\"><h2>Sources<\/h2><ul><li><a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc9110.html\" target=\"_blank\" rel=\"noopener noreferrer\">IETF RFC 9110: HTTP Semantics \u2014 Accept and Vary<\/a><\/li><li><a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc9111.html\" target=\"_blank\" rel=\"noopener noreferrer\">IETF RFC 9111: HTTP Caching \u2014 Matching Vary<\/a><\/li><li><a href=\"https:\/\/web.dev\/articles\/optimize-cls\" target=\"_blank\" rel=\"noopener noreferrer\">Google web.dev: Optimize Cumulative Layout Shift<\/a><\/li><li><a href=\"https:\/\/web.dev\/articles\/browser-level-image-lazy-loading\" target=\"_blank\" rel=\"noopener noreferrer\">Google web.dev: Browser-level image lazy loading<\/a><\/li><li><a href=\"https:\/\/www.w3.org\/WAI\/tutorials\/images\/decorative\/\" target=\"_blank\" rel=\"noopener noreferrer\">W3C WAI: Decorative Images<\/a><\/li><li><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/images.html\" target=\"_blank\" rel=\"noopener noreferrer\">WHATWG HTML: Images and source selection<\/a><\/li><li><a href=\"https:\/\/curl.se\/docs\/manpage.html\" target=\"_blank\" rel=\"noopener noreferrer\">curl: Command-line reference<\/a><\/li><\/ul><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A historical sample of twenty front pages shows different image types, but also a GET\/HEAD comparison limit. A clearer method checks two GET responses, actual files and cache rules separately.<\/p>\n","protected":false},"author":1,"featured_media":31101,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[158],"tags":[91219,92757,91315],"class_list":["post-15777","post","type-post","status-publish","format-standard","hentry","category-tutorials-en-web-development","tag-tutorial","tag-web-development","tag-web-performance"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Which Image Format a Browser Receives: Checking Format Selection and Cache Rules | Lukas Wojcik<\/title>\n<meta name=\"description\" content=\"How content negotiation for images works, what fourteen of seventy-six sampled images actually did, and why 783 of 1345 images carry no dimensions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Which Image Format a Browser Receives: Checking Format Selection and Cache Rules | Lukas Wojcik\" \/>\n<meta property=\"og:description\" content=\"How content negotiation for images works, what fourteen of seventy-six sampled images actually did, and why 783 of 1345 images carry no dimensions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-14T06:50:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/klarheit-20261111-15777.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lukas Wojcik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Wojcik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Which Image Format a Browser Receives: Checking Format Selection and Cache Rules\",\"datePublished\":\"2026-11-14T06:50:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/\"},\"wordCount\":1175,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/klarheit-20261111-15777.png\",\"keywords\":[\"Tutorial\",\"Web Development\",\"Web Performance\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/\",\"name\":\"Which Image Format a Browser Receives: Checking Format Selection and Cache Rules | Lukas Wojcik\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/klarheit-20261111-15777.png\",\"datePublished\":\"2026-11-14T06:50:00+00:00\",\"description\":\"How content negotiation for images works, what fourteen of seventy-six sampled images actually did, and why 783 of 1345 images carry no dimensions.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/klarheit-20261111-15777.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/klarheit-20261111-15777.png\",\"width\":1200,\"height\":630,\"caption\":\"Which Image Format a Browser Receives: Checking Format Selection and Cache Rules\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/tutorials-en-web-development\\\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Which Image Format a Browser Receives: Checking Format Selection and Cache Rules\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"Lukas Wojcik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"Lukas Wojcik\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Which Image Format a Browser Receives: Checking Format Selection and Cache Rules | Lukas Wojcik","description":"How content negotiation for images works, what fourteen of seventy-six sampled images actually did, and why 783 of 1345 images carry no dimensions.","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:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/","og_locale":"en_US","og_type":"article","og_title":"Which Image Format a Browser Receives: Checking Format Selection and Cache Rules | Lukas Wojcik","og_description":"How content negotiation for images works, what fourteen of seventy-six sampled images actually did, and why 783 of 1345 images carry no dimensions.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-11-14T06:50:00+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/klarheit-20261111-15777.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Which Image Format a Browser Receives: Checking Format Selection and Cache Rules","datePublished":"2026-11-14T06:50:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/"},"wordCount":1175,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/klarheit-20261111-15777.png","keywords":["Tutorial","Web Development","Web Performance"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/","name":"Which Image Format a Browser Receives: Checking Format Selection and Cache Rules | Lukas Wojcik","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/klarheit-20261111-15777.png","datePublished":"2026-11-14T06:50:00+00:00","description":"How content negotiation for images works, what fourteen of seventy-six sampled images actually did, and why 783 of 1345 images carry no dimensions.","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/klarheit-20261111-15777.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/klarheit-20261111-15777.png","width":1200,"height":630,"caption":"Which Image Format a Browser Receives: Checking Format Selection and Cache Rules"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/tutorials-en-web-development\/which-image-format-a-browser-receives-checking-format-selection-and-cache-rules\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Which Image Format a Browser Receives: Checking Format Selection and Cache Rules"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"Lukas Wojcik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"Lukas Wojcik"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/15777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=15777"}],"version-history":[{"count":7,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/15777\/revisions"}],"predecessor-version":[{"id":33087,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/15777\/revisions\/33087"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/31101"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=15777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=15777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=15777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}