You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a minor gripe, but I noticed that Loopback projects contain the same favicon.ico as strongloop.com. This is frustrating because in a browser with a lot of tabs, I can't distinguish which tab is my local server vs strongloop.com, where I usually have doc opened.
Personally I prefer not to even have a favicon set by default. The browser caches the favicon to localhost:3000, and then any node app I work on (loopback or not) contains the Strongloop icon until I forcibly delete the cache.
@pwwolf Thanks for your suggestion! We will see if there is any improvement to update the icon change faster. As a workaround you could probably load your app after setting the favicon.
And you can also customize your favicon by setting it in middleware.json, check our doc for details.
Another idea(not sure whether it works): you can try some watchify modules like this watchify example, it can watch and update changes in certain folders without restarting your server.
Hey @superkhau@ritch@raymondfeng@bajtos, from the description above, some improvement regarding favicon might be need:) User has to clear cache every time to see the favicon change. The customized favicon(set from middleware.json) has the same problem. Any ideas about updating the favicon faster?
I am proposing to keep loopback#favicon as it is for backwards compatibility, and modify slc loopback to scaffold a project that does not come with any favicon middleware.
I just realized one negative consequence of removing the favicon middleware. Since loopback records 404s to the console, there are errors with stack traces unavoidably shown in the console when the browser attempts to request the now-missing favicon.
Even though the error is benign, I'd rather deal with the default favicon than have to see the error messages.
Error: Cannot GET /favicon.ico
at raiseUrlNotFoundError (/home/pw/lb/node_modules/loopback/server/middleware/url-not-found.js:15:17)
at Layer.handle [as handle_request] (/home/pw/lb/node_modules/loopback/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/pw/lb/node_modules/loopback/node_modules/express/lib/router/index.js:312:13)
at /home/pw/lb/node_modules/loopback/node_modules/express/lib/router/index.js:280:7
at Function.process_params (/home/pw/lb/node_modules/loopback/node_modules/express/lib/router/index.js:330:12)
at next (/home/pw/lb/node_modules/loopback/node_modules/express/lib/router/index.js:271:10)
at /home/pw/lb/node_modules/loopback/node_modules/express/lib/router/index.js:618:15
at next (/home/pw/lb/node_modules/loopback/node_modules/express/lib/router/index.js:256:14)
at Function.handle (/home/pw/lb/node_modules/loopback/node_modules/express/lib/router/index.js:176:3)
at router (/home/pw/lb/node_modules/loopback/node_modules/express/lib/router/index.js:46:12)
Activity
jannyHou commentedon Nov 20, 2015
@pwwolf Thanks for your suggestion! We will see if there is any improvement to update the icon change faster. As a workaround you could probably load your app after setting the favicon.
And you can also customize your favicon by setting it in middleware.json, check our doc for details.
Another idea(not sure whether it works): you can try some watchify modules like this watchify example, it can watch and update changes in certain folders without restarting your server.
jannyHou commentedon Nov 20, 2015
Hey @superkhau @ritch @raymondfeng @bajtos, from the description above, some improvement regarding favicon might be need:) User has to clear cache every time to see the favicon change. The customized favicon(set from middleware.json) has the same problem. Any ideas about updating the favicon faster?
bajtos commentedon Nov 20, 2015
IIUC, the favicon is cached by the browser - I don't think we can do much here. See e.g this thread discussing the topic in Chrome context: https://productforums.google.com/forum/#!topic/chrome/zXlEW0ZFErY
The only solution I can think of is to disable the default StrongLoop favicon as suggested @pwwolf:
I don't have a strong opinion which way is better. @ritch @raymondfeng do you happen to remember why we added the default StrongLoop-branded favicon?
superkhau commentedon Nov 23, 2015
My vote goes to no icon to prevent issues like this from coming up again in the future.
zanemcca commentedon Nov 25, 2015
+1 for no icon
bajtos commentedon Nov 27, 2015
I am proposing to keep
loopback#faviconas it is for backwards compatibility, and modifyslc loopbackto scaffold a project that does not come with any favicon middleware.bajtos commentedon Nov 27, 2015
@zanemcca @pwwolf would you like to contribute this change yourself? Here is the place where to start looking: https://github.com/strongloop/loopback-workspace/blob/a388532346ec2a9b498d3ff6a97b6248b3e613a7/templates/components/api-server/template/server/middleware.json#L3
pwwolf commentedon Nov 30, 2015
I just realized one negative consequence of removing the favicon middleware. Since loopback records 404s to the console, there are errors with stack traces unavoidably shown in the console when the browser attempts to request the now-missing favicon.
Even though the error is benign, I'd rather deal with the default favicon than have to see the error messages.