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 more