Habitica: Cache the favicon file

Created on 2 Nov 2017  路  14Comments  路  Source: HabitRPG/habitica

The favicon we're using is downloaded again any time you visit a new page, it should be cached

help wanted minor other

Most helpful comment

Ah I missed that, in that case @jnes92 it would be better to wait for us to merge that PR then you can work on the cache part :)

All 14 comments

Does the current version has a favicon ?
The current website (habitica.com) does not seem to have one attached.
In my local environment on the latest development branch I also don麓t see this file.

_(Btw. was looking for some small issue for getting started to contribute to habitica 馃憤 )_
Would it be fine to use a Webpack plugin/ some other 3rd party for this?

@jnes92 hmm you're right...

the site shows a favicon for me
schermata 2017-11-06 alle 12 42 56

but if you go to that url the result is a 404 error and no file exists in git.

So yeah it looks like we should add the file, using a webpack plugin is fine but we already have some plugins setup for files in the /website/client/assets file that get automatically cached if they are loaded through webpack. In this case we might want to add the file directly in the index.html thought so that we don't have to wait for the JS to load before showing the icon, in that case our webpack setup is not yet setup to cache those files

I'll get the icons and get back to you

A favicon PR has already been created here: https://github.com/HabitRPG/habitica/pull/9235

Ah I missed that, in that case @jnes92 it would be better to wait for us to merge that PR then you can work on the cache part :)

9235 has been merged. @jnes92 are you still interested in working on caching? If so, we'd love your help!

@Alys Yes, I would like to work on this one ! Thanks for notifying me. I will start it on the next weekend 馃憤

@paglias @Alys Should this be marked as in progress?

@jnes92 Any updates on your work on this issue? Let us know when you have a chance. Thank you!

@beffymaroo Does this issue still exist? I'm unable to reproduce locally.

@BlkStormy can you post your network log to show the cached favicon?

@TheHollidayInn My bad on this, I realized that it wasn't actually caching when looking into it further. I'm trying to see if I can pin this one down.

@TheHollidayInn Opening up a pull request on this now

This is still desired. Hopefully the closed PR offers a helpful way forward to accelerate development on a solution.

Actually I just realized this has been fixed by a previous PR, it's not perfect but now the favicon is handled like all the other static files and cached for at least 1 week

Was this page helpful?
0 / 5 - 0 ratings