Unable to add favicon to my jsp - favicon

I am unable to add a favicon to my jsp page. Adding the favicon as a link to a specific path did not work for me.
Any help would be greatly appreciated.
Here you can see my WebContent folder with what I tried, as well as the path to the icon I used.

You should put the favicon inside the Web-Content folder directly (not in the image folder) if you want the best compatibility with most browsers.
The link would then be: <link rel="shortcut icon" href="home_logo_vPK_icon.ico?" type="image/x-icon" />
Also, did you refresh the cache before testing? If not, reset the cache, or you will not see your changes.
Finally, it could also be your icon. Try using a favicon generator.

Related

Github... Background image doesn't display when I publish my site on github

I'm a beginner in web Dev.. I have a website that displays properly on localhost but when I publish and try to render it on Github, the background image doesn't show up.. What can I do to remedy this
Can you post a bit of code for us to look at?
My guess is that you have the background image referenced absolutely on the computer, and it needs to be a relative reference to render when hosted online, but I can't say for sure without having some code to look at.
A link to your github project would also help.
Edit: It looks like you perhaps renamed your startup.css to style.css and forgot to edit the html header link from startup.css, to style.css
I.e. change
<link rel="stylesheet" type="text/css" href="startup.css">
to
<link rel="stylesheet" type="text/css" href="style.css">
Previous suggestion (no longer likely):
As you mention Windows, one possibility is that you have mixed up Capital and small letters somewhere in the filename or path.
Simple web-servers on Windows are often forgiving (as is Windows filesystem) of these mistakes, while internet is not-

how can I make a site wide favicon

I'd like to make a site wide icon for my website. Using Corel Photopaint X5, but it doesn't have an .ico export option.
I can make a 1-page-only favicon by exporting a 32x32 pixel .png file and then using the command
(my code examples are always trimmed out.)
on each page. However I've many,many pages, hence the need for a site-wide one.
I've used an on-line converter to make an .ico file 16,32,48 pixels which I've uploaded to my webroot. Permissions are 755. However no luck.
For reference my webroot is: my-domain.com/www/ My server uses this instead of public_html.
Use this code in header :
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>

I made a new favicon, but whenever i enter in the code from my old website, it immediately goes back to the old one

I was having a problem with my favicon previously, (here is my old favicon http://imgur.com/a/cATBc) (if you cant see it, it is a tiny blue dot in the corner of the screen)
But now, whenever I enter even a snippet of my old code, it immediately goes back to that favicon, even though I deleted all traces of it from my computer and GitHub.
My new favicon is a pug face.
Edit: ANY new website I make now has the old favicon.
Any help?
NEW EDIT: my website files are here: https://github.com/Pugplays42/htmlstuff
Check out the favicon-cheat-sheet from Audrey Roy Greenfeld.
Especially the "Forcing a Favicon Refresh" section:
Clear the browser cache on Windows (Ctrl+F5 or Ctrl+Shift+R) and on Mac (Command + Shift + R).
Also close and reopen browser if IE.
If still stuck, try opening new tab. Or see this question
Temporarily add explicit HTML markup and append a query string. Remove this when you're done:
<link rel="shortcut icon" href="http://www.yoursite.com/favicon.ico?v=2" />
<link rel="icon" sizes="16x16 32x32" href="/favicon.ico?v=2">
For large versioned deployments, if all site visitors need their favicon force-refreshed in an extreme situation:
Add explicit HTML markup (customize the sizes part) and put your version number in the filename.
<link rel="shortcut icon" href="/favicon-v2.ico" />
<link rel="icon" sizes="16x16 32x32" href="/favicon-v2.ico">

favicon automatically download in browser

i am using favicon this code.
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
But favicon is automatically downloading in browser.
Please help us how can we resolve this issue..
My advice:
In the HTML declaration, use an absolute path (ie. /images/favicon.ico), to avoid any relative path issue.
Download the file manually (eg. download http://yourwebsite.com/images/favicon.ico) and open it with an image editor. This is to make sure that your web server really returns your favicon.ico file and not something else. When a file does not exist, some web servers are configured to return some content, such as a "Oops!" web page, instead of a plain 404 error. This can trick the browser.
When opening your page, enable your favorite web debuging tool (Firefox+Firebug, Chrome console...), select the Network tab to look at the HTTP exchanges and spot the access to favicon.ico. Check the Mime type: it should be image/x-icon (or maybe something similar). If you see something really suspicious, such as application/octet-stream, there must be something wrong on the server side.

How To automatically update resourse link in eclipse when files moved to other location

I have imported website template in eclipse using file->import->General->Archive File..Template contains html files and also resource folder which contains CSS Javascript etc.I want to put html file in user folder and resource files in user_resource folder. But the problem i get is eclipse doesn't automatically update links in html file to the resource file.Do i manually update all the links in HTML file or is there any way like dreamweaver to update the links when file get moved to other location? For example i have link
<link href="user/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
it should automatically update to
<link href="../user_resource/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
when assets folder move to user_resource folder.
Any help would be appriciated
I have not used dreamweaver much. But I find these links may be useful to solve the problem if someone know how to use dreamweaver.
Try it out...
http://www.whoi.edu/services/stad/classes/DreamWeaver/movingfilesfolders.html
http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7c3ea.html