{"id":1129,"date":"2015-07-01T21:38:12","date_gmt":"2015-07-01T19:38:12","guid":{"rendered":"http:\/\/www.robinglauser.ch\/blog\/?p=1129"},"modified":"2015-07-01T21:38:12","modified_gmt":"2015-07-01T19:38:12","slug":"resolve-caching-issues-without-additional-vversionnumber-parameter","status":"publish","type":"post","link":"https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/","title":{"rendered":"Resolve caching issues without additional ?v=versionnumber parameter"},"content":{"rendered":"<p>Have you ever had the need to resolve caching issues for other clients? And did you do that by adding some parameter to your resource link?<\/p>\n<p>The problem with this method is, that proxy&#8217;s normaly won&#8217;t cache files with a parameter and you won&#8217;t get the advantages of caching if a user is visiting your site via a proxy.<\/p>\n<p>With this little code snippet which was copied from the <a href=\"http:\/\/www.initializr.com\/\" target=\"_blank\">initializr<\/a> template you can reset the cache of a file by renaming the link to filename.1.jpg for a image.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&lt;IfModule mod_rewrite.c&gt;\r\n     RewriteEngine On\r\n     RewriteCond %{REQUEST_FILENAME} !-f\r\n     RewriteRule ^(.+)\\.(\\d+)\\.(bmp|css|cur|gif|ico|jpe?g|js|png|svgz?|webp)$ $1.$3 &#x5B;L]\r\n&lt;\/IfModule&gt;\r\n<\/pre>\n<p>If you want to go one step further you can even automate the image naming by using the latest time when the file was change with a php function.\u00a0<a href=\"http:\/\/www.particletree.com\/notebook\/automatically-version-your-css-and-javascript-files\/\" target=\"_blank\">http:\/\/www.particletree.com\/notebook\/automatically-version-your-css-and-javascript-files\/<\/a><\/p>\n<p>Source: <a href=\"http:\/\/www.stevesouders.com\/blog\/2008\/08\/23\/revving-filenames-dont-use-querystring\/\" target=\"_blank\">http:\/\/www.stevesouders.com\/blog\/2008\/08\/23\/revving-filenames-dont-use-querystring\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Have you ever had the need to resolve caching issues for other clients? And did you do that by adding some parameter to your resource link? The problem with this method is, that proxy&#8217;s normaly won&#8217;t cache files with a parameter and you won&#8217;t get the advantages of caching if a user is visiting your site via a proxy. With &#8230; <a class=\"read-more\" href=\"https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[45],"tags":[],"class_list":["post-1129","post","type-post","status-publish","format-standard","hentry","category-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Resolve caching issues without additional ?v=versionnumber parameter - Robin Glauser<\/title>\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.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Resolve caching issues without additional ?v=versionnumber parameter - Robin Glauser\" \/>\n<meta property=\"og:description\" content=\"Have you ever had the need to resolve caching issues for other clients? And did you do that by adding some parameter to your resource link? The problem with this method is, that proxy&#8217;s normaly won&#8217;t cache files with a parameter and you won&#8217;t get the advantages of caching if a user is visiting your site via a proxy. With ... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/\" \/>\n<meta property=\"og:site_name\" content=\"Robin Glauser\" \/>\n<meta property=\"article:published_time\" content=\"2015-07-01T19:38:12+00:00\" \/>\n<meta name=\"author\" content=\"Robin Glauser\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@robinglauser\" \/>\n<meta name=\"twitter:site\" content=\"@robinglauser\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Robin Glauser\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/2015\\\/07\\\/01\\\/resolve-caching-issues-without-additional-vversionnumber-parameter\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/2015\\\/07\\\/01\\\/resolve-caching-issues-without-additional-vversionnumber-parameter\\\/\"},\"author\":{\"name\":\"Robin Glauser\",\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/#\\\/schema\\\/person\\\/e1a94504a6ff5171fa13670932514b19\"},\"headline\":\"Resolve caching issues without additional ?v=versionnumber parameter\",\"datePublished\":\"2015-07-01T19:38:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/2015\\\/07\\\/01\\\/resolve-caching-issues-without-additional-vversionnumber-parameter\\\/\"},\"wordCount\":173,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/#\\\/schema\\\/person\\\/e1a94504a6ff5171fa13670932514b19\"},\"articleSection\":[\"Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/2015\\\/07\\\/01\\\/resolve-caching-issues-without-additional-vversionnumber-parameter\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/2015\\\/07\\\/01\\\/resolve-caching-issues-without-additional-vversionnumber-parameter\\\/\",\"url\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/2015\\\/07\\\/01\\\/resolve-caching-issues-without-additional-vversionnumber-parameter\\\/\",\"name\":\"Resolve caching issues without additional ?v=versionnumber parameter - Robin Glauser\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/#website\"},\"datePublished\":\"2015-07-01T19:38:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/2015\\\/07\\\/01\\\/resolve-caching-issues-without-additional-vversionnumber-parameter\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/2015\\\/07\\\/01\\\/resolve-caching-issues-without-additional-vversionnumber-parameter\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/2015\\\/07\\\/01\\\/resolve-caching-issues-without-additional-vversionnumber-parameter\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resolve caching issues without additional ?v=versionnumber parameter\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/\",\"name\":\"Robin Glauser\",\"description\":\"My Blog about Development, Design and my random thoughts.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/#\\\/schema\\\/person\\\/e1a94504a6ff5171fa13670932514b19\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/#\\\/schema\\\/person\\\/e1a94504a6ff5171fa13670932514b19\",\"name\":\"Robin Glauser\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/DSC_1244_small.jpg\",\"url\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/DSC_1244_small.jpg\",\"contentUrl\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/DSC_1244_small.jpg\",\"width\":800,\"height\":530,\"caption\":\"Robin Glauser\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/DSC_1244_small.jpg\"},\"description\":\"I'm a web developer.\",\"sameAs\":[\"https:\\\/\\\/www.robinglauser.ch\",\"https:\\\/\\\/www.instagram.com\\\/robinglauser\\\/\",\"https:\\\/\\\/x.com\\\/robinglauser\"],\"url\":\"https:\\\/\\\/www.robinglauser.ch\\\/blog\\\/author\\\/robin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Resolve caching issues without additional ?v=versionnumber parameter - Robin Glauser","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.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/","og_locale":"en_US","og_type":"article","og_title":"Resolve caching issues without additional ?v=versionnumber parameter - Robin Glauser","og_description":"Have you ever had the need to resolve caching issues for other clients? And did you do that by adding some parameter to your resource link? The problem with this method is, that proxy&#8217;s normaly won&#8217;t cache files with a parameter and you won&#8217;t get the advantages of caching if a user is visiting your site via a proxy. With ... Read More","og_url":"https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/","og_site_name":"Robin Glauser","article_published_time":"2015-07-01T19:38:12+00:00","author":"Robin Glauser","twitter_card":"summary_large_image","twitter_creator":"@robinglauser","twitter_site":"@robinglauser","twitter_misc":{"Written by":"Robin Glauser","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/#article","isPartOf":{"@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/"},"author":{"name":"Robin Glauser","@id":"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19"},"headline":"Resolve caching issues without additional ?v=versionnumber parameter","datePublished":"2015-07-01T19:38:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/"},"wordCount":173,"commentCount":0,"publisher":{"@id":"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19"},"articleSection":["Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/","url":"https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/","name":"Resolve caching issues without additional ?v=versionnumber parameter - Robin Glauser","isPartOf":{"@id":"https:\/\/www.robinglauser.ch\/blog\/#website"},"datePublished":"2015-07-01T19:38:12+00:00","breadcrumb":{"@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/07\/01\/resolve-caching-issues-without-additional-vversionnumber-parameter\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.robinglauser.ch\/blog\/"},{"@type":"ListItem","position":2,"name":"Resolve caching issues without additional ?v=versionnumber parameter"}]},{"@type":"WebSite","@id":"https:\/\/www.robinglauser.ch\/blog\/#website","url":"https:\/\/www.robinglauser.ch\/blog\/","name":"Robin Glauser","description":"My Blog about Development, Design and my random thoughts.","publisher":{"@id":"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.robinglauser.ch\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19","name":"Robin Glauser","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg","url":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg","contentUrl":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg","width":800,"height":530,"caption":"Robin Glauser"},"logo":{"@id":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg"},"description":"I'm a web developer.","sameAs":["https:\/\/www.robinglauser.ch","https:\/\/www.instagram.com\/robinglauser\/","https:\/\/x.com\/robinglauser"],"url":"https:\/\/www.robinglauser.ch\/blog\/author\/robin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/posts\/1129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/comments?post=1129"}],"version-history":[{"count":5,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/posts\/1129\/revisions"}],"predecessor-version":[{"id":1134,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/posts\/1129\/revisions\/1134"}],"wp:attachment":[{"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/media?parent=1129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/categories?post=1129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/tags?post=1129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}