#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Location
    Wellingborough, Northants, UK
    Posts
    103
    Rep Power
    18

    Question Automatically create shortcut to site on desktop?


    Hi guys,

    I have had an intriguing request that I'm not sure about...

    I have been asked if it possible to include something which will allow the user to add a short-cut to the page to their desktop with a customised icon.

    OR

    If it is possible to pop-up a request to add the page to the users 'Favourites' with a customised icon.

    I'm sure I have seen this or similar, for example if you add Apache.org to your favourites you get a little Apache Icon, but I couldn't seen any code which specified it.

    I have a feeling that the favourites Icon only works with IE right?

    If anyone has any ideas about this or has used it before, any help would be great

    Thanks for your time,

    Dan
    DELETE FROM pay WHERE employee_name ='Dan';
  2. #2
  3. Senior Polecat
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Jersey (the original version)
    Posts
    210
    Rep Power
    15
    Hi,

    Working backwards:

    Icons in Favs menu:

    this is dead easy but buggy as hell:

    1. create 16 x 16 px icon
    2. save as "favicon.ico" (must be exactly that!)
    3. Add following to <head> of document:

    <link rel="SHORTCUT ICON" href="URL to favicon.ico">

    4. Upload icon and page - sorted

    Issues.

    As you said it's ie only. Plus (and this is the main issue with it) if a user empties their cache - they flush your icon with all the other saved stuff. This won't be restored unless they bookmark your page again!

    Shortcut

    V. Tricky, there is no automatic way to do this (BIG security risk if there was!)

    You can upload the shortcut from windows and allow them to link to it but IE really screams at the user for downloading shortcuts - as i said, they're a big security risk online.

    Hope that helps

    Icy
    Quidquid latine dictum sit, altum viditur.

    http://www.XSet.co.uk
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Location
    Wellingborough, Northants, UK
    Posts
    103
    Rep Power
    18

    wow


    Thanks for that icy_ploecat, very useful...

    For the Shortcut solution I was wondering if there was a solution along the lines of:

    body onLoad calls a function which will display an alert box from which the user can select yes or no to creating the shortcut on their desktop...

    I can see where you are coming from with regard to security issues, why is it people who know the least about web technologies always pose the most difficult problems?

    Thanks for your time, if I find anything I'll post it incase anyone else has been looking into this problem.

    Regards,

    Dan
    DELETE FROM pay WHERE employee_name ='Dan';
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2003
    Posts
    1,014
    Rep Power
    19
    As you said it's ie only.
    Just for the record: favicons are supported by Mozilla (since version 0.9) and Opera (as of version 7) as well.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2000
    Posts
    763
    Rep Power
    0
    And for the record the favicon does not need to be named "favicon.ico" to work for Mozilla. It can be any image format, such as png, jpg or gif.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Location
    Wellingborough, Northants, UK
    Posts
    103
    Rep Power
    18

    Thanks for the replies guys


    Thank-you for all you spending time on this good to see I've been proved wrong with Mozilla and Opera, does make cross platform compatability easier when functions are supported in most of them.

    Thanks again,

    Dan

    p.s. I'm still looking into the shortcut on desktop option, I'll post a reply if I find out anything useful.
    DELETE FROM pay WHERE employee_name ='Dan';
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    2
    Rep Power
    0
    This isn't automatic, and I'm unsure how browsers other than IE handle it, but here goes anyway.

    You can add a page to Favorites in IE by dragging the favicon/explorer icon from the address toolbar, and dropping it onto the Favorites button, the Favorites side bar, or onto the 'links' toolbar. If you have a custom favicon loaded on the site, this will then be displayed in favorites, and in the address bar when you click through.

    So?

    This also works if you drag the favicon from the address toolbar to your desktop, creating a shortcut to the page.
    Your favicon is 16x16px, but will be resized to 32x32px for your desktop. This will probably make it look a little blurred.

    To make it really simple for the user:

    Make a picture showing the words "Drag me/this pic to your desktop!" and stick it on your front page, linked to the page you want people to bookmark. The text below the desktop shortcut icon is defined by the image <alt=""> tag as below.
    Code:
    <a href="http://www.fligbob.co.uk"><img src="DragMe.gif" border=0 alt="Fligbob Desktop Shortcut"></a>
    When the user drags the pic to their desktop it adds a shortcut icon, using the sites favicon.

    Simple example here if it's any use:
    http://www.fligbob.co.uk/dev/favdrag.htm
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Location
    Wellingborough, Northants, UK
    Posts
    103
    Rep Power
    18

    Talking fligbob - thanks


    thanks for your reply, I have created an icon and placed it into my root directory (called it favicon.ico). Also I included the <rel link="shortcut icon"... option in the header and tried the drag suggestion in your post... these are my results:

    1: right-click in page, add to favourites -adds favourite with custom icon.
    2: right-click in page, create shortcut -adds shortcut to desktop with custom icon.
    3: drag link to desktop -creates shortcut but without custom icon.

    below is the code I used to see if the drag function worked:
    Code:
    <a href="http://www.mysite.co.uk"><img src="http://www.mysite.co.uk/mysite_icon.bmp" border=0 alt="Shortcut to mysite.co.uk"></a>
    I didn't get a custom icon when i tried it on your example page either... or in the other 2 ways... Is it an IE 6.0 problem?

    Anyway, many thanks for your help, I am much further than I was a few days ago

    thanks,

    Dan
    DELETE FROM pay WHERE employee_name ='Dan';
  16. #9
  17. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    2
    Rep Power
    0
    Hehe,

    Favicons are notorious for showing up when they feel like it (little beggars).

    I've cleared my cache and faves and tried my example page again. It took a couple of drags, (and clicking thru on the shortcut) before it showed with a custom icon.

    I've been all over the net this morning, dragging pics and text links (to home pages) onto my desktop. It picks up some custom favicons first time(immediately upon being dropped onto the desktop), others need to be clicked thru from the desktop before the favicons showed, and some (sites I know use favicons) are still showing an explorer icon no matter what I do.

    Sometimes you can click a 'favorite' which has a custom favicon, and not see the favicon in the address bar when you get to the site. These little icons are a law unto themselves unfortunately.

    I suggest if you can see a favicon anywhere on your site, you're probably winning.

  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Location
    Wellingborough, Northants, UK
    Posts
    103
    Rep Power
    18

    thanks again Fligbob...


    Yeah annoying little buggers aren't they? I had heard (somewhere in the misty past) that they can be a bit iffy, but like you say I'm 2/3rds the way there and I reckon I should count myself lucky

    Many thanks again for your help

    Dan
    DELETE FROM pay WHERE employee_name ='Dan';

IMN logo majestic logo threadwatch logo seochat tools logo