SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question One click to make this your home page ?

    The code below doesn't seem to work, is there an updated version now please?

    <a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.website.com');">To make this your home page, just click here</a>

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,097
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    This looks like a JavaScript question, Dez, so I've moved it to that forum. Is this something you want to place on your website?
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Sorry, yes, it should have gone to the js section, but while we're here, is there any way, in any type of code, where the user can make the website their home page, with ONE click please?

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Only with Internet Explorer and only where the browser is set to allow the home page to be changed from a script.

    Too many scammers were getting that code to run automatically when someone visited a given web page so it is now blocked everywhere as a security measure.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Thanks Stephen, is that in all versions of IE please?

  6. #6
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question ONE click to make this your home page ?

    Is there any way, in any type of code, where the user can make the website their home page, with ONE click please?

  7. #7
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Dez View Post
    Thanks Stephen, is that in all versions of IE please?
    Older versions of IE still allow spammers to swap their homepage - usually either to their scam site or a porn site and then lock the browser so that the person will need to edit the registry to change it back.

    I haven't specifically tested various versions of IE for this since the other security software on my computer blocks any attempt to change the home page in IE - which also prevents the registry update that I make available for people to lock their home page in insecure versions of IE from being able to be applied - but since the security in those cases also prevents changing the home page at all from a web page the same end goal of securing the browser is achieved.

    If you want people to be able to use a link in your page to change their home page then they need to be running an old version of IE and not have any decent security installed - just don't expect such computers to load your page in an acceptable time because the thousands of key loggers installed on each of those computers will be using up most of the available bandwidth sending all the useful info about the computer's owner (passwords etc) to the key loggers' owners.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  8. #8
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Thanks Stephen, that's useful to know. Okay, using the easiest, shortest route possible for the user, what's the best way and simplest way to do it please?

  9. #9
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Dez View Post
    Okay, using the easiest, shortest route possible for the user, what's the best way and simplest way to do it please?
    It depends on the browser they are using.

    If they are using Internet Explorer then the simplest way for them to choose to make the current page their home page is to go into the "Tools" menu and select "Internet Options" then at the top of the "General" tab press the "Use Current" button followed by the "OK" button.

    Of course if they already have one or more home pages set and want to add the current page as an additional home page then they will need to copy the address from the address bar and add it as a new line in the text area above the "Use Current" button and then just press the "OK" button.

    It will be similar in other browsers but the exact names of the menu options and buttons to press will vary.

    Setting home pages became a lot more complicated since tabbed browsers were created since now you can have as many home pages as you like all at the same time.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  10. #10
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,097
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Dez, I don't know how important your site is, but I'd think it's a long shot that people would want this option anyway, unless you are Google or some major go-to news site.

    Maybe a better option is to create a button that easily allows people to bookmark your site in their main toolbar. That's something I've seen quite often. I don't know how to set that up, but that's what I'd suggest.

    The more common options these days are to get people to follow you on Twitter, Facebook, RSS etc.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  11. #11
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,135
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by ralph.m
    Dez, I don't know how important your site is, but I'd think it's a long shot that people would want this option anyway, unless you are Google or some major go-to news site.
    That is it right there, do you *honestly* think someone wants to make your site their homepage – honestly. Sounds something the marketing and sales fools would ask for.
    The only code I hate more than my own is everyone else's.

  12. #12
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Did we just go back to 1998? This "Set this site as your home page" button was popular in 1998...
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  13. #13
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    Did we just go back to 1998? This "Set this site as your home page" button was popular in 1998...
    Exactly -- As mentioned this capability is blocked for a reason... that reason being abuse of it.

    But really you should never replicate functionality already built into the browser... The user can make any page their home page through the normal method, and wasting code/bandwidth on some "make this home" nonsense is outdated thinking that again, is one of those things that has zero malfing business being implemented on a website!

  14. #14
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Yep, obviously Facebook feel it's a good idea The last time I looked there, they had some sort of drag-this-icon-here-to-make-this-your-homepage. So far, that seems to be the nearest to one-touch-make-this-your-homepage stuff - unless anyone here knows differently?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •