Splunk Search

favicon change not working

GKC
Explorer

I managed to change the path of the favicon link in my app, so I could have my own favicon showing....but I cannot understand why it is not working. It still shows the default splunk favicon.

This is the resulting html:

I thought that maybe the browser was not finding the icon, but I already tried pasting the path in the browser and it clearly finds and shows the icon then.

does any of you have any clue why this is not working for my app??

Tags (1)
1 Solution

GKC
Explorer

After some hours of investigation I finally solved the issue.
Changing the href in the existing link tag for the favicon did not make any difference, so I assumed that some of the lines that were coming right after had something to do with my problem...

so I decided to change my javascript function, and make it append a new link at the end of the section....and it worked!!!

This is the actual javascript that I am using now:

onLoad=favicon();

function favicon(){
var link = top.document.createElement("link");
link.type = "image/x-icon";
link.rel = "shortcut icon";
link.href = "/en-US/static/app/myappname/favicon.ico";
top.document.getElementsByTagName("head")[0].appendChild(link);

}

View solution in original post

GKC
Explorer

After some hours of investigation I finally solved the issue.
Changing the href in the existing link tag for the favicon did not make any difference, so I assumed that some of the lines that were coming right after had something to do with my problem...

so I decided to change my javascript function, and make it append a new link at the end of the section....and it worked!!!

This is the actual javascript that I am using now:

onLoad=favicon();

function favicon(){
var link = top.document.createElement("link");
link.type = "image/x-icon";
link.rel = "shortcut icon";
link.href = "/en-US/static/app/myappname/favicon.ico";
top.document.getElementsByTagName("head")[0].appendChild(link);

}

Get Updates on the Splunk Community!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

New Release | Splunk Cloud Platform 10.1.2507

Hello Splunk Community!We are thrilled to announce the General Availability of Splunk Cloud Platform 10.1.2507 ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

🗣 You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...