dez — 2011-06-29T05:17:33-04:00 — #1
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>
ralphm — 2011-06-29T06:19:03-04:00 — #2
dez — 2011-06-29T07:12:41-04:00 — #3
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?
felgall — 2011-06-29T15:56:30-04:00 — #4
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.
dez — 2011-06-30T05:06:10-04:00 — #5
Thanks Stephen, is that in all versions of IE please?
dez — 2011-06-30T05:08:31-04:00 — #6
Is there any way, in any type of code, where the user can make the website their home page, with ONE click please?
felgall — 2011-06-30T05:58:44-04:00 — #7
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.
dez — 2011-07-04T14:04:18-04:00 — #8
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?
felgall — 2011-07-04T17:35:02-04:00 — #9
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.
ralphm — 2011-07-04T18:53:40-04:00 — #10
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.
oddz — 2011-07-04T20:28:28-04:00 — #11
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.
logic_earth — 2011-07-04T21:02:51-04:00 — #12
Did we just go back to 1998? This "Set this site as your home page" button was popular in 1998...
system — 2011-07-04T22:13:22-04:00 — #13
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!
dez — 2011-07-12T10:51:02-04:00 — #14
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?