Favicon?


#1

I’m sure I’m missing something rudimentary here…

I seem to be having difficulty getting my favicon to appear. I have my
favicon.ico in the public folder. I’ve configured my route.rb to route
the intro page to my “home” controller. I’m using application.rb in my
views to template the headers and footers.

Here is the tag in my in the application.rb:

<link rel="shortcut icon" href="favicon.ico" />

Any ideas?

Dave

David Andrew T.
http://dathompson.blogspot.com

#2

Most likely it is the missing / before the favicon.ico.

The rel=“shortcut icon” is for when it is dragged to the desktop. You
will also need a rel=“icon”.

Also, you should add a forward slash before the favicon.ico path to
make it an absolute path.

Try using these:

Tom


#3

Thanks…I changed the code to reflect the appropriate syntax, with my
favicon.ico file in {root}/public , but still nothing.

Then, I changed the target path to “images/favicon.ico” and stuck the
favicon.ico file in the images folder of public so:

{root}/public/images/favicon.ico

It’s showing now.

On 3/4/06, Tom D. removed_email_address@domain.invalid wrote:

> views to template the headers and footers. > ~~~~~~~~~~~~~~~~~~~ http://lists.rubyonrails.org/mailman/listinfo/rails

David Andrew T.
http://dathompson.blogspot.com

#4

Hi David,

I believe some versions of Internet Explorer expect the favicon.ico to
be in the root of the website (so in your public folder). So, you may
want to keep another copy there… or just move it to the root of the
public folder.

Tom


#5

On Sat, 2006-03-04 at 13:21 -0800, David Andrew T. wrote:


I didn’t have to do anything like that but I did have to close all
copies of the web browser and restart the web server (or webrick as it
were) and then it started working and I felt foolish when I asked the
list and then later that day it started showing up.

Craig


#6

2 and a half years later. Well I just had this issue, and
closing/reopening the browser made the favicon finally appear!

If this can cave someone a few moments of frustration.


#7

Fernando P. wrote:

2 and a half years later. Well I just had this issue, and
closing/reopening the browser made the favicon finally appear!

If this can cave someone a few moments of frustration.

Hmm, I tested on IE6, and the favicon won’t appear. Anyway even
microsoft.com won’t display any favicon, so I won’t even bother.