From f38114e161194e6448f4b7e9b7a4793760e7e92c Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 12 Jul 2022 11:53:59 +0100 Subject: [PATCH] DEV: Remove development cache-buster query parameter (#17444) All our development-mode assets serve a `Cache-Control: no-cache` header, so a query parameter shouldn't be needed. Ember CLI does not include cache-busting parameters, so this change will move the development rails app to the same behaviour. This will fix adding persistent breakpoints in the dev tools. Previously, the browser would think that the assets have been replaced and throw away the breakpoints. --- app/helpers/application_helper.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3a20ea4ba9a..487f59ca470 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -125,13 +125,6 @@ module ApplicationHelper path = path.gsub("#{GlobalSetting.cdn_url}/assets/", "#{GlobalSetting.cdn_url}/brotli_asset/") end - if Rails.env == "development" - if !path.include?("?") - # cache breaker for mobile iOS - path = path + "?#{Time.now.to_f}" - end - end - path end