Bug 243722

Summary: cannot update favicon from database config by javascript in safari private mode
Product: WebKit Reporter: le ngoc trung <trunglee155>
Component: WebKit WebsiteAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: achristensen, beidson, jond, smoley, webkit-bug-importer
Priority: P3 Keywords: InRadar, PlatformOnly
Version: Safari 15   
Hardware: iPhone / iPad   
OS: All   

le ngoc trung
Reported 2022-08-09 01:13:14 PDT
I have a website (reactjs code). Last year, my site's favicon is only one. And I setting favicon by <link rel="icon" type="image/x-icon" href="/images/favicon.ico"> in head tag. Then my user want to add favicon and title config from database. In index.js file, app will call api getFavicon, and then update favicon using bellow code. var link = document.querySelector("link[rel~='icon']"); if (!link) { link = document.createElement('link'); link.rel = 'icon'; document.getElementsByTagName('head')[0].appendChild(link); } link.href = faviconFromApi; After we update favicon from database All browser work fine. But only in safari private mode, favicon is not change. it still display the old favicon we added last year. We try to remove cache and test again but it still not change. But if we use safari normal mode, it work fine (favicon will change exactly). Then I try to another way. remove cache and restart our iphones. And the results are, in private mode, ios 15.6 and ios 15.1, the favicon update successully. But only ios 15.5 it still not work. Please help me to fix it. How to make favicon in safari private mode change like what is safari normal mode work.
Attachments
Radar WebKit Bug Importer
Comment 1 2022-08-16 01:14:19 PDT
Smoley
Comment 2 2022-08-16 15:38:13 PDT
I think the fix for this will likely be in a Safari component rather than WebKit. Please reproduce the issue, note the time of occurrence and file feedback containing a sysdiagnose via http://feedbackassistant.apple.com. Thanks.
Note You need to log in before you can comment on or make changes to this bug.