Jump to content

Quickie favicon question


Recommended Posts

I'm doing some work on my company's website and they expressed an intereste in implementing a favicon. However, the design handbooks and manuals I have are a bit sparse on how these things behave.

I've generated the 32x32 icon and tested it with the index.html page, and it works just fine. However, they want the icon site-wide, on all pages, and I'm wondering if there's an easy way to blanket-apply it. Unfortunately the pages were not generated with a template (using Dreamweaver 8 here), so I can't just update a template and let the change filter out from there.

Can favicons be implemented via CSS? The vast majority of, if not all, pages in the site pull from a style.css file, so that would be as good as a Dreamweaver template (probably better).

Or does a favicon in the index.html page apply to all subpages within the domain?

Long story short, is there any more efficient way to apply the thing than manually cycling through all the individual HTML documents and pasting in the line referencing it?

Thanks!

Link to comment
Share on other sites


I don't think there is a way to add favicons by CSS. You could try to use a server side script (like PHP, ASP or Server side include (SSI)) if the server support it. Internet Explorer automaticly looks for a favicon.ico in the server root if you bookmark the site, but IE is the only browser that do that. If you can't use any server side scripts you will have to insert it to every html page. You can open all files in Dreamweaver and use the find and replace function like in the picture, just hit replace all, It will add a "<link rel="shortcut icon" href="/favicon.ico" />" before every "</head>".

post-159368-1193174740_thumb.jpg

Edited by kacper
Link to comment
Share on other sites

Kacper - That looks promising. I think I'll give that a whirl.

Ah, the many joys of working on preexisting websites. Especially when they were built by consultants in the first place. I mean, who'm I supposed to LART for not using templates? Nobody, that's who. Bloody outsourcing.

Okay, thanks a million. I'll be back to whine if it doesn't work, but I can't see it not working.

Edited by CelticWhisper
Link to comment
Share on other sites

@Kacper - Interesting. We're actually testing on IE7, but I tried the trick anyway. ...Aaaaand IE7 is still insisting on not displaying the icon. IE7 is not my friend. I do not like IE7.

Any other thoughts? Maybe a separate tag just for IE, like you once had to do with <EMBED> or something like that? (been a long time)

Link to comment
Share on other sites

Try to check the site on another computer with ie7, try also to make a 16x16 icon and not 32x32. If that doesn't work post the code your using.

I had posted the same topic on Neowin and someone there alerted me that IE7 requires a .ico file to actually be a .ico resource, made with an icon generator. The .ico file I'm using is a renamed .gif file. As soon as I get my hands on an icon generator I'm going to test the site with the actual .ico.

Thanks for all the ideas and suggestions, everyone. I'll let you know how it turns out.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...