diff --git a/components/article/ArticlePage.tsx b/components/article/ArticlePage.tsx index 2ff11494b1..f007f7ef32 100644 --- a/components/article/ArticlePage.tsx +++ b/components/article/ArticlePage.tsx @@ -15,7 +15,6 @@ import { ArticleGridLayout } from './ArticleGridLayout' import { PlatformPicker } from 'components/article/PlatformPicker' import { ToolPicker } from 'components/article/ToolPicker' import { MiniTocs } from 'components/ui/MiniTocs' -import { ClientSideHighlight } from 'components/ClientSideHighlight' import { LearningTrackCard } from 'components/article/LearningTrackCard' import { RestRedirect } from 'src/rest/components/RestRedirect' import { Breadcrumbs } from 'components/page-header/Breadcrumbs' @@ -51,7 +50,6 @@ export const ArticlePage = () => { {isDev && } - {router.pathname.includes('/rest/') && }
diff --git a/middleware/favicons.js b/middleware/favicons.js index 9e5f426945..851954dca2 100644 --- a/middleware/favicons.js +++ b/middleware/favicons.js @@ -17,6 +17,14 @@ const MAP = { contentType: 'image/png', buffer: getBuffer('assets/images/site/apple-touch-icon.png'), }, + // It's the same image but it's fine. By default, when Safari tries to + // to figure out which apple touch icons are available it will + // try to load this by default. For example, if you in desktop Safari + // click share icon, it will load this to serve as a preview icon. + '/apple-touch-icon-precomposed.png': { + contentType: 'image/png', + buffer: getBuffer('assets/images/site/apple-touch-icon.png'), + }, } function getBuffer(filePath) { diff --git a/src/rest/components/RestReferencePage.tsx b/src/rest/components/RestReferencePage.tsx index c33d9bcae3..55276a44a9 100644 --- a/src/rest/components/RestReferencePage.tsx +++ b/src/rest/components/RestReferencePage.tsx @@ -7,7 +7,6 @@ import { PermissionsStatement } from 'components/ui/PermissionsStatement' import { RestOperation } from './RestOperation' import { useAutomatedPageContext } from 'components/context/AutomatedPageContext' import { Operation } from './types' -import { ClientSideHighlight } from 'components/ClientSideHighlight' import { ClientSideRedirects } from 'src/rest/components/ClientSideRedirects' import { RestRedirect } from 'src/rest/components/RestRedirect' @@ -40,7 +39,6 @@ export const RestReferencePage = ({ restOperations }: StructuredContentT) => { {/* Doesn't matter *where* this is included because it will never render anything. It always just return null. */} -

diff --git a/tests/rendering/favicons.js b/tests/rendering/favicons.js index 3107dca7aa..f5d896064f 100644 --- a/tests/rendering/favicons.js +++ b/tests/rendering/favicons.js @@ -6,7 +6,7 @@ import { get } from '../helpers/e2etest.js' describe('favicon assets', () => { jest.setTimeout(60 * 1000) - it('should serve a valid and aggressively caching /favicon.ico', async () => { + test('should serve a valid and aggressively caching /favicon.ico', async () => { const res = await get('/favicon.ico') expect(res.statusCode).toBe(200) expect(parseInt(res.headers['content-length'], 10)).toBeGreaterThan(0) @@ -21,7 +21,8 @@ describe('favicon assets', () => { expect(maxAgeSeconds).toBeGreaterThanOrEqual(60 * 60) expect(res.headers['surrogate-key']).toBe(SURROGATE_ENUMS.MANUAL) }) - it('should serve a valid and aggressively caching /apple-touch-icon.png', async () => { + + test('should serve a valid and aggressively caching /apple-touch-icon.png', async () => { const res = await get('/apple-touch-icon.png') expect(res.statusCode).toBe(200) expect(parseInt(res.headers['content-length'], 10)).toBeGreaterThan(0) @@ -36,4 +37,10 @@ describe('favicon assets', () => { expect(maxAgeSeconds).toBeGreaterThanOrEqual(60 * 60) expect(res.headers['surrogate-key']).toBe(SURROGATE_ENUMS.MANUAL) }) + + test('should also 200 OK on /apple-touch-icon-precomposed.png', async () => { + const res = await get('/apple-touch-icon-precomposed.png') + expect(res.statusCode).toBe(200) + expect(res.headers['content-type']).toBe('image/png') + }) })