|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
How to make that little icon appear in the url box!
I have often wondered how to make a little icon appear before the 'http://....' in the url box of the browser. I suspect it is call of an image in the .htaccess page because it's the first thing that appears before the page content.
In case there is anyone reading this that doesn't know what I'm talking about look at this link:- http://www.codeproject.com/jscript/jsbeginner.asp The website has nothing to do with me but is an example of many website that do this. So my question is, how do you do this? |
|
#2
|
||||
|
||||
|
favicon
What you are looking for is "favicon". This shows up in favorites/bookmarks, and tabs too. It's easy to do, just add this to your pages' head section
<link rel='shortcut icon' href='favicon.ico' > and put the image in your top level folder (public_html) You may be able to name the file something else, but I think using favicon is more automatically recognised by some browsers and they will use it even without the link tag. There are sites online that will let you upload images and convert them to ico for you. Last edited by Mittineague : June 21st, 2006 at 09:11 PM. |
|
#3
|
||||
|
||||
|
Yes thanks! I had been rummaging though the source code of the example website I gave before, and I suspected it at first then for some reason I dropped that idea. About 20 lines down, sure enough, there it is:- <link rel="icon" href="/favicon.ico" type="image/ico">
<link rel="SHORTCUT ICON" href="/favicon.ico">. That's great, now I know the name of it! |
|
#4
|
||||
|
||||
|
technically, so long as you have an icon in the root folder of your site and call it "favicon.ico", i think browsers will pick that up.
using hte LINK tag is explicitly defining it, and I believe that to be the more proper way.
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter! DevArticles Forum Moderator "The net is a waste of time, and that's exactly what's right about it." -- William Gibson |
|
#5
|
||||
|
||||
|
OK, I made a nice little favicon in photoshop from a jpg of 25x15 pixels, and called it favicon.ico. It's in the root folder plus the LINK tags are in the head of my index page. It doesn't appear to be working, however, I'm using IEv5.2 and Safari! Does the image have to be any shape ie round? any size?
|
|
#6
|
||||
|
||||
|
Stop press! it's working, I used Netscape and it was there! I think I have quit/restart the other browsers for it to work.
|
|
#7
|
||||
|
||||
|
favicon
I didn't think you could simply rename a jpg ico. I figured it was a different compression. well, learn something new everyday!
I remember reading a while back that some browsers only liked certain sizes - square 16 x 16 - as a security measure. This was to prevent someone from making a favicon image of something like "https://www.YourBank.com/Account/SecurePage.html" to fill the address bar when you're really at www.IndentityTheft.com |
|
#8
|
||||
|
||||
|
You might be right about the image compression because despite quit/restarting IE/Mac & Safari, they refuse to show the favicon like Netscape and FireFox do. The 25x15 is squished up to a, I guess, 16x16, is it even makes some adjustment! This thing about the browser I use to view changes to the website has really hampered progress more than I expected. You would expect after making a change you would merely refresh the browser and one could see the update, but no, a few times when you need to something quickly, the browser has has displayed the same as before. And so you go down that route of checking the code etc. Only after viewing in another type of browser one can see the reality and the previous browser has to be recycled to get it display the change. Really frustrating!
|
|
#9
|
|||
|
|||
|
get off ie 6 for one, cause it never picks up the ico for whatever reason on my machine. ff and opera, and ie 7 pick it up by default, but ie 6 seems to have issues with it.
__________________
Apache Expert |
|
#10
|
||||
|
||||
|
IE and favicon
The "fix" for IE is to mousedown on the favicon in the address bar and drag it a bit. For some reason this causes IE to load and show it (until the cache is cleared). But I certainly wouldn't expect site visitors to be doing this just to see if the site had a favicon.
|
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Server Configuration > How to make that little icon appear in the url box! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|