mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 07:17:00 +08:00
fix(core): update favicon (#12581)
not changing the favicon.ico file to make sure the change will be updated on the user's browser to get rid of caching <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Style** - Updated the favicon URL across the application and link previews to include a version query parameter (`?v=2`) for better cache control. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -67,7 +67,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
{
|
||||
description: 'Test Description',
|
||||
favicons: [
|
||||
'http://example.com/favicon.ico',
|
||||
'http://example.com/favicon.ico?v=2',
|
||||
],
|
||||
images: [
|
||||
'http://example.com/image.png',
|
||||
@@ -82,7 +82,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
{
|
||||
charset: 'gbk',
|
||||
favicons: [
|
||||
'http://example.com/favicon.ico',
|
||||
'http://example.com/favicon.ico?v=2',
|
||||
],
|
||||
images: [],
|
||||
title: '你好,世界。',
|
||||
@@ -95,7 +95,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
{
|
||||
charset: 'shift_jis',
|
||||
favicons: [
|
||||
'http://example.com/favicon.ico',
|
||||
'http://example.com/favicon.ico?v=2',
|
||||
],
|
||||
images: [],
|
||||
title: 'こんにちは、世界。',
|
||||
@@ -108,7 +108,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
{
|
||||
charset: 'big5',
|
||||
favicons: [
|
||||
'http://example.com/favicon.ico',
|
||||
'http://example.com/favicon.ico?v=2',
|
||||
],
|
||||
images: [],
|
||||
title: '你好,世界。',
|
||||
@@ -121,7 +121,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
{
|
||||
charset: 'euc-kr',
|
||||
favicons: [
|
||||
'http://example.com/favicon.ico',
|
||||
'http://example.com/favicon.ico?v=2',
|
||||
],
|
||||
images: [],
|
||||
title: '안녕하세요, 세계.',
|
||||
|
||||
Binary file not shown.
@@ -178,7 +178,7 @@ export class DocRendererController {
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<link rel="icon" sizes="192x192" href="/favicon-192.png" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="shortcut icon" href="/favicon.ico?v=2" />
|
||||
<meta name="emotion-insertion-point" content="" />
|
||||
${!opts ? '<meta name="robots" content="noindex, nofollow" />' : ''}
|
||||
<meta
|
||||
|
||||
@@ -286,7 +286,7 @@ export class WorkerController {
|
||||
// fix favicon
|
||||
{
|
||||
// head default path of favicon
|
||||
const faviconUrl = new URL('/favicon.ico', response.url);
|
||||
const faviconUrl = new URL('/favicon.ico?v=2', response.url);
|
||||
const faviconResponse = await fetch(faviconUrl, { method: 'HEAD' });
|
||||
if (faviconResponse.ok) {
|
||||
appendUrl(faviconUrl.toString(), res.favicons);
|
||||
|
||||
Reference in New Issue
Block a user