Favicon Woes In A Large Web2 Project

In my main, very large Xojo Web (web 2) project, the built app (debug or compiled) never shows a favicon, in the browser; only a white rectangle.

In a new web 2 project, I can get a favicon to appear without issue. (so it’s not the icon I’m using, my browser, my OS, etc.)

Are there any usual suspects when it comes to a favicon “misbehaving”?

If not, I’ll look at creating a new project and moving everything over to it and see if it behaves, or, if doesn’t behave, what was the last thing I moved before it broke.

Anthony

Doesn’t show locally, connecting to the server or both?
Changing the icon makes any difference?

Try clearing the cache or using a private tab to see what a “new” browser would see. The cache time on these icons is very long.

Greg - I assume you mean the browser cache, and not the Xojo “Clear Caches” button.

I regularly test in private windows, in multiple devices, in multiple browsers; some browsers are reset regularly (all data cleared).

I’m pretty sure this isn’t a caching issue.

Thanks for the thought though!

Anthony

Alberto,

Doesn’t show anywhere, for any connection type.

I’ve tried many different icons. (all of which work fine in a new project)

I’m pretty sure I covered all the “obvious bits” before posting.

Appreciate the feedback though!

Anthony

When you look at the favicon in the resources folder, is it a white square image or is it what you’re expecting?

Can you check if the webapp code points to the correct image and the image is correct in the resource folder (as said by Tim).

I have seen this as the cache data on the browser stays for a long time (as said by Greg) even on Private/Incognito instances (not sure why).

If your webapp is public, you may share the URL and we confirm if we get the same.

@Tim_Parnell & @AlbertoD - thank you.

This is now fixed, but I’m honestly not sure why or how?

The favicon in the resources folder of the built app was a white square, not the expected icon, so I manually deleted it.

I then built the app again and it was the expected icon?

And… the debug build shows the correct icon now too? (in every browser I test with, without needing to clear caches?!?)

I don’t quite understand what happened.

I did restart my computer this AM because it was being “flaky”, but I’ve had this problem for over a year and it’s never been fixed before. [EDIT - I mean a restart never fixed the issue before]

Whatever the case, I have a favicon and I can’t complain even though I don’t really know what I did to fix it. ¯\(ツ)

Marking Tim’s post as the solution, since it was after I checked and manually deleted the “white square” favicons that everything suddenly started working. (though I truly have no idea why that would change the behavior when debugging??)

So thanks to both of you and @Greg_O for helping.

I’m just glad to have the expected favicon showing.

I did have one thought… this project is in a git repo which is synced with Github and I don’t sync the .xojo_resources file for the project. I don’t remember why I don’t sync it, I think because it causes some “goofiness” when I switch between my desktop and my laptop?

Is that where the .favicon is stored? I ask because when I change it, there’s no file to commit in Github Desktop… (my git client)

Could not syncing it somehow have caused this issue?

Anthony

Very strange that the favicon was not replaced when you build the project.
I am under the impression that the build folder gets deleted each time.
The project icon is saved in the .xojo_resources file. That is used for favicon.
I’m glad that you were able to get this working.

2 Likes

Yes, that’s where the icon is stored (and also the app icon for desktop projects). I include it as part of the source code I commit.

You may have added it to .gitignore since you mention you don’t sync it. Check there and remove the definition if so.

2 Likes

It is in the .gitignore file currently (well a wildcard). This is why it doesn’t show as modified. (see below)

*.xojo_uistate
*.xojo_resources
*.DS_Store
*.nosync
Builds*
TempSaveFile*
*.obsolete*

I’ll removed the “*.xojo_resources” entry from the “.gitignore” file for now and won’t replace it unless I run into issues.

Again, thanks for the pointers; I’m glad to have a proper icon again.

Anthony