From 31c1973693b5fc6cf70c2cfd53078e734a2b831a Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 9 Sep 2024 10:53:39 +0100 Subject: [PATCH 1/4] Remove custom apple touch icons from static The custom apple touch icons are not required in static as we use the apple-touch-icon provided by govuk-frontend (Design System) across GOV.UK via the link tag in layout_for_public.html.erb from the govuk_publishing_components gem --- app/assets/images/apple-touch-icon-152x152.png | Bin 1313 -> 0 bytes app/assets/images/apple-touch-icon-167x167.png | Bin 1466 -> 0 bytes app/assets/images/apple-touch-icon-180x180.png | Bin 1605 -> 0 bytes app/assets/images/apple-touch-icon.png | Bin 1045 -> 0 bytes 4 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 app/assets/images/apple-touch-icon-152x152.png delete mode 100644 app/assets/images/apple-touch-icon-167x167.png delete mode 100644 app/assets/images/apple-touch-icon-180x180.png delete mode 100644 app/assets/images/apple-touch-icon.png diff --git a/app/assets/images/apple-touch-icon-152x152.png b/app/assets/images/apple-touch-icon-152x152.png deleted file mode 100644 index 6d01410fe485f6819b255823886b6c4e52721f9c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1313 zcmV++1>X9JP)0{{R3FC5Sl0000pP)t-s3k(cM zNlD@1;s5{tq@<*jm6camSn%-h!otFKc6KT%Dzme*(b3Tw8ykg&hB-PqXJ=>s5*w!g z00gN?L_t(|0qns60RR910U-XLHbfNw005qJ?3#(zt0)YB13_6Nf%kvf8L8wH%Jd(P zw7;`_cc%yaN@7^N0^AFY2O92$!Gi_v#fk?j+zg8a3vka^8n_#)MDlK6;Z{b@2LRZ1 zuMGf#cX*qjiatEVf{(WuI2-`e`CsgRF>B@bTZtKB{1YZ~D=`xQ+%Dt*g1L)W(E`E( zK~aM{kYFccAxqO;*s!p{%^*A=_+{3`nG8b4gA5hQ#w`lI3q{<~sflD0%VcrK(YL({ zHq=N8Bwi09d=bWqkw|v2bX~)Dh$z%Z3R^#f?sw+xBpOXD6$>>;xc-N)Unljls`5aR+osOrXc<2 zlhV5nOR!>k-~a1K1-0ov|7K)m=5(eUtnd?wnOC?*(z1$}Q-EdiiUBSVtW=+AVzTq2 z8H*jv@D~5KrySq!{LXV`;T}*3=e7&yIk(l3S$a9S^P49Y(%9^sR|;dXsiBNE!-%x6 z#}bUlHqH#?IQhN&EsI;il31O)pGEH!S6uZpHr!Pvn9ddev!G-Hn zk`FJz<3RHrY6f4P`uXTXm-ExM*jsn27@x&V0*$C4nP;)+y05X#+puS>v|=lO7qM7lT9$Ak=4*EmoB2vk zi%J=ToVBE`KWe@q5V6OB70bt_j8D#GeAh_>CPU`P>)pjhIx;Oog&&fjqy&ILhRS+m z7e%{&pglS1K4Hid5NiOFs;YvDm)ACu(iA;ZRMkiZKr@vF4KwgZ#Y)f9ANPAk`JXD? z-jiiwJuVT&|0?vd{u*sZ6c*HIEAp~FBbb8e?wI<*-M<9u`=-v{z#LR}hG|~U%tG;! zbFXfzX1c>`HT4|Rs{Xi@L)Bu7!l+rg+BvnNKQJkG^cIC^nAt=uylJ++h}P@Oe<|pA z6RmUDjok-c+Gw1JhIuSFkp0ezMds7ZV+`Qg8vKm|Zk*H~wf34oCn1000F2f8CBi1poj50D!Fk XOr1MG{%#_c00000NkvXXu0mjf>#$}C diff --git a/app/assets/images/apple-touch-icon-167x167.png b/app/assets/images/apple-touch-icon-167x167.png deleted file mode 100644 index 1fea1e27d38f138c545328b1e5696a4f932a8c00..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1466 zcmV;r1x5OaP)(q@<)*SXl7z@JLBX!otF(X7BL; z00lxxL_t(|0qoH+uEZb^gJBP0vkbE#_rL8!gAfOJjSGK`+g~#NLqtSGL_|bHMC<^w zVp{>T%eD*5s%;h23jgit!+(3aZMi}2o0(s*YTn}<|G^a98(-(F^WTFfJLmp!u%emY&Cu|91=?zld zmJV)ii-Ssi-xoN-wg8Sl=B-3YLKKEpAV^do{QuYP;%Zdl+@X74U0oSvo(Va{?y6S< zQ)5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P>;yakJ||RQcm3-j;!RAyajVj{IDjJvTnoX+o-EXpqXeTZA@o+aG22vaT8O{@l3m zzicH7UbDzSGhdS<-mcgK+qMEPxZ5dPADf%;ChDeFc&mz%NChZ*7RhY>5-I4>mXhdm zm3l;`CBc*@s-k96lFtvRdDRm85#K4fUQ6`UlT8s0M4_ZFzi2*<>D|2Qk!Fv=k_wzC zBuvrIsyFh3db*v0o8;w!pil)gEccDJy&U0Xz}xfn$y%TO$q{Ct8EXjgd713J0MFpjAGgOw zEd1;%17;45_B{L(`3lt$G5_5%+z7wxJpDiI!2t;X004lX|F7E-s8av{00000K#zMb UCREptE&u=k07*qoM6N<$g1kr6wEzGB diff --git a/app/assets/images/apple-touch-icon-180x180.png b/app/assets/images/apple-touch-icon-180x180.png deleted file mode 100644 index 7c33beba86ee3e6e00cd1183ef428a38fcc19d50..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1605 zcmV-L2Dd(S6EoHv$JPsXBrzDNJ&X5Dk{Rl!qL&uc6N4@m6bUYjRAtMy+VM$Kb;KPGjYpwXi|Z96W2d(eQf!0&MCQ3ZBZ z{hB5#qUUJU%J$2yCBtCc91vsjpIuy?ruvx}uM1+B9lQiC;KJnKGB}i;A^E#Av!7D^&UW6-xbH{MY@bNXm^7?Kx+q{<94|#vT(g zzWcaN4LOLeSMkV{&$=f;`lbZxe|HzR(17G3L=Rl)9PTTspRKbCd8lZOOxayb%=bmv zTCIb7MsVMli0Q# zdzphFtq_AfJD&7&zZKXp2gIT?jKu%qu!m>eIj4IEhpK??B}{_HQpNZ~Bo=XcMHgP5 zCc4USwnOFnZ+)6Q>ivH@_dtD`J-iStRDJ%>9!BHrc|}q|5I(FV>iJ;JI_Qm^4&Pr- z4kEdIg5#{`=;R>Q!<9}JI%2fCm2637-VBWzZyL>E;OF8t`^nxd-O{eo2KtZ`FN|V| zv+QLE6`eg^PYMYbb*wV7;;mDuYr91N2Gh~G8i2@g+|Yh=PS@XS4it_EKp)+n&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_Q0x5wZ-N@e^w)w!~L%my2v4gY)kuor3R+z zRxE^HNRf3p6(g<1P|$|@(r+w#y4kQ0RRwDSrgai4;4={NULf_2TcMunm* z6CK#90u|T3ffCE%pmNNDndxDikNLG=*h&|y7#Hb+h;fN7NVuTVu!<`d8n)mHM;*<~ zc@x!1%o}Fb)N#0?5P4p6Rx05kNvWJy_Cy7jnESqQnx<)*rfHg{X`225y)r1ao8p6$ P00000NkvXXu0mjfKlc5Q From e039875b1cb723c9741539f54ef71ee99d8eccfb Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 9 Sep 2024 10:56:21 +0100 Subject: [PATCH 2/4] Remove redirects for apple-touch-icons The IconRedirectController will now only redirect the favicon.ico file provided by govuk-frontend (Design System) All references to `apple-touch-icons` have been removed as this approach is not required. The apple-touch-icon is provided by govuk-frontend (Design System) across GOV.UK via the link tag in layout_for_public.html.erb from the govuk_publishing_components gem. --- app/controllers/icon_redirects_controller.rb | 10 ++------ config/routes.rb | 26 ++------------------ 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/app/controllers/icon_redirects_controller.rb b/app/controllers/icon_redirects_controller.rb index 560d1cfd9..36c6d202e 100644 --- a/app/controllers/icon_redirects_controller.rb +++ b/app/controllers/icon_redirects_controller.rb @@ -1,14 +1,8 @@ class IconRedirectsController < ApplicationController before_action { expires_in(1.day, public: true) } - def show - redirect_to(view_context.asset_path(request.path.to_s[1..]), - status: :moved_permanently, - allow_other_host: true) - end - - def apple_old_size_icon - redirect_to(view_context.asset_path("apple-touch-icon.png"), + def show_favicon + redirect_to(view_context.asset_path("favicon.ico"), status: :moved_permanently, allow_other_host: true) end diff --git a/config/routes.rb b/config/routes.rb index f030e4b47..476927f0d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -15,28 +15,6 @@ get "/templates/:template.html.erb", to: "root#template" end - # Icon redirects - get "/favicon.ico", to: "icon_redirects#show" - get "/apple-touch-icon.png", to: "icon_redirects#show" - get "/apple-touch-icon-180x180.png", to: "icon_redirects#show" - get "/apple-touch-icon-167x167.png", to: "icon_redirects#show" - get "/apple-touch-icon-152x152.png", to: "icon_redirects#show" - - # Old devices with old OSs may still request these old image sizes - # They should receive a working image. - # It's acceptable to send them a higher resolution image which they will downscale. - # https://mathiasbynens.be/notes/touch-icons - get "/apple-touch-icon-120x120.png", to: "icon_redirects#apple_old_size_icon" - get "/apple-touch-icon-76x76.png", to: "icon_redirects#apple_old_size_icon" - get "/apple-touch-icon-60x60.png", to: "icon_redirects#apple_old_size_icon" - get "/apple-touch-icon-precomposed.png", to: "icon_redirects#apple_old_size_icon" - get "/apple-touch-icon-114x114-precomposed.png", to: "icon_redirects#apple_old_size_icon" - get "/apple-touch-icon-120x120-precomposed.png", to: "icon_redirects#apple_old_size_icon" - get "/apple-touch-icon-144x144-precomposed.png", to: "icon_redirects#apple_old_size_icon" - get "/apple-touch-icon-152x152-precomposed.png", to: "icon_redirects#apple_old_size_icon" - get "/apple-touch-icon-176x176-precomposed.png", to: "icon_redirects#apple_old_size_icon" - get "/apple-touch-icon-180x180-precomposed.png", to: "icon_redirects#apple_old_size_icon" - get "/apple-touch-icon-57x57-precomposed.png", to: "icon_redirects#apple_old_size_icon" - get "/apple-touch-icon-72x72-precomposed.png", to: "icon_redirects#apple_old_size_icon" - get "/apple-touch-icon-76x76-precomposed.png", to: "icon_redirects#apple_old_size_icon" + # Favicon redirect + get "/favicon.ico", to: "icon_redirects#show_favicon" end From 4d9411a2227b3de5b4e1d4508c88f3a5895b3ab6 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 9 Sep 2024 10:56:51 +0100 Subject: [PATCH 3/4] Remove apple-touch-icons from rake task --- lib/tasks/publishing_api.rake | 90 ----------------------------------- 1 file changed, 90 deletions(-) diff --git a/lib/tasks/publishing_api.rake b/lib/tasks/publishing_api.rake index 103060ce1..babbec4cc 100644 --- a/lib/tasks/publishing_api.rake +++ b/lib/tasks/publishing_api.rake @@ -5,96 +5,6 @@ ROUTES = [ title: "Favicon", description: "The favicon is the image displayed in locations such as the browser tabs.", }, - { - base_path: "/apple-touch-icon.png", - content_id: "cdc36458-74d4-42a7-86c8-221e03877dfc", - title: "Crest for Apple iOS bookmarks", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-144x144.png", - content_id: "a18912cb-94ff-46a0-b9a3-5f707b0dca2f", - title: "Crest for Apple iOS bookmarks 144px by 144px", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-114x114.png", - content_id: "d8a8b79a-b056-4f87-bb48-47566645f358", - title: "Crest for Apple iOS bookmarks 114px by 114px", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-72x72.png", - content_id: "98fc34ab-b620-4bd4-bc8a-d4db63960f4f", - title: "Crest for Apple iOS bookmarks 72px by 72px", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-57x57.png", - content_id: "c7de1c80-f278-49c4-84cd-a8ff53149ab6", - title: "Crest for Apple iOS bookmarks 57px by 57px", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-precomposed.png", - content_id: "d8c1618b-ad27-42f3-a7cd-b11f4b90a15e", - title: "Crest for Apple iOS bookmarks", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-114x114-precomposed.png", - content_id: "c15ee6fd-fb3a-45ab-b9e1-0efe1a8a6c2e", - title: "Crest for Apple iOS bookmarks", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-120x120-precomposed.png", - content_id: "2e676337-94f3-4f4f-8501-83a1c7813bf8", - title: "Crest for Apple iOS bookmarks", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-144x144-precomposed.png", - content_id: "5fd9d11e-997a-4850-ad69-a43a3aec8a9f", - title: "Crest for Apple iOS bookmarks", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-152x152-precomposed.png", - content_id: "39541207-fdce-4415-8498-42477fce4b58", - title: "Crest for Apple iOS bookmarks", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-176x176-precomposed.png", - content_id: "96833c45-64e2-4bdb-af43-90a96be2a1a3", - title: "Crest for Apple iOS bookmarks", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-180x180-precomposed.png", - content_id: "db853854-42a6-49ce-95c5-0b41b4bed921", - title: "Crest for Apple iOS bookmarks", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-57x57-precomposed.png", - content_id: "ead323b2-80e0-494f-8b1d-f7f998b9267c", - title: "Crest for Apple iOS bookmarks", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-72x72-precomposed.png", - content_id: "4068ca41-f6b1-48d5-a19d-3ea85be49434", - title: "Crest for Apple iOS bookmarks", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, - { - base_path: "/apple-touch-icon-76x76-precomposed.png", - content_id: "0526a59d-c9f8-4d44-8649-e54d532a0b35", - title: "Crest for Apple iOS bookmarks", - description: "Used by iOS when saving GOV.UK as a shortcut icon.", - }, ].freeze namespace :publishing_api do From f37d96972adb38692e23bbe671ebc37bf9c043e7 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 9 Sep 2024 10:57:15 +0100 Subject: [PATCH 4/4] Update icon_redirects_test.rb The test will now only check that the favicon.ico file is redirected. Uncommented a test that was previously broken when checking for apple touch icons. It appears that in order for the tests to pass, there needs to be an entry in both routes.rb and publishing_api.rake, for example favicon.ico and apple-touch-icon.png pass (referenced in both files), but apple-touch-icon-152x152 does not (only referenced in routes.rb) --- test/integration/icon_redirects_test.rb | 54 +++++++------------------ 1 file changed, 15 insertions(+), 39 deletions(-) diff --git a/test/integration/icon_redirects_test.rb b/test/integration/icon_redirects_test.rb index b2a18591e..87413a46b 100644 --- a/test/integration/icon_redirects_test.rb +++ b/test/integration/icon_redirects_test.rb @@ -1,47 +1,23 @@ require_relative "../integration_test_helper" class IconRedirectsTest < ActionDispatch::IntegrationTest - [ - "favicon.ico", - "apple-touch-icon.png", - "apple-touch-icon-180x180.png", - "apple-touch-icon-167x167.png", - "apple-touch-icon-152x152.png", - ].each do |file| - should "redirect #{file} to the asset path" do - get "/#{file}" - assert_equal 301, last_response.status - assert_equal last_response.headers["Cache-Control"], "max-age=86400, public" - # In development and test mode the asset pipeline doesn't add the hashes to the URLs - assert_equal "http://example.org/assets/static/#{file}", last_response.location - end - - # TODO: check if this test is required and raise an issue for it - # should "redirect #{file} to a location that exists" do - # get "/assets/static/#{file}" - # assert_equal 200, last_response.status - # assert last_response.body.size > 100 - # end + should "redirect `favicon.ico` to the asset path" do + get "/favicon.ico" + assert_equal 301, last_response.status + assert_equal last_response.headers["Cache-Control"], "max-age=86400, public" + # In development and test mode the asset pipeline doesn't add the hashes to the URLs + assert_equal "http://example.org/assets/static/favicon.ico", last_response.location + end - should "ignore query string when redirecting #{file}" do - get "/#{file}?foo=bar" - assert_equal 301, last_response.status - assert_equal "http://example.org/assets/static/#{file}", last_response.location - end + should "redirect `favicon.ico` to a location that exists" do + get "/assets/static/favicon.ico" + assert_equal 200, last_response.status + assert last_response.body.size > 100 end - [ - "apple-touch-icon-120x120.png", - "apple-touch-icon-76x76.png", - "apple-touch-icon-60x60.png", - "apple-touch-icon-precomposed.png", - ].each do |file| - should "redirect old icon size #{file} to the default apple-touch-icon.png icon" do - get "/#{file}" - assert_equal 301, last_response.status - assert_equal last_response.headers["Cache-Control"], "max-age=86400, public" - # In development and test mode the asset pipeline doesn't add the hashes to the URLs - assert_equal "http://example.org/assets/static/apple-touch-icon.png", last_response.location - end + should "ignore query string when redirecting `favicon.ico`" do + get "/favicon.ico?foo=bar" + assert_equal 301, last_response.status + assert_equal "http://example.org/assets/static/favicon.ico", last_response.location end end