473,395 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How do I get the browser's "home" URL?

Hi,

I would like to know how to find out which is the browser's "home"
URL?
This is so I'll be able to suggest "set as homepage" for my website,
only for those who did not set it beforehand.
I know there's a security issue with this, but is there some
workaround it?

Thanks,
Gabi

Aug 5 '07 #1
7 5311
Gabriella said the following on 8/5/2007 12:12 PM:
Hi,

I would like to know how to find out which is the browser's "home"
URL?
var browserHomePage = prompt("What is your home page?");
This is so I'll be able to suggest "set as homepage" for my website,
only for those who did not set it beforehand.
I know there's a security issue with this, but is there some
workaround it?
Nope. And, thankfully so.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 5 '07 #2
Gabriella wrote:
I would like to know how to find out which is the browser's
"home" URL?
This is so I'll be able to suggest "set as homepage" for
my website, only for those who did not set it beforehand.
I know there's a security issue with this,
It is a privacy issue not a security issue. My home page(s) are nobody's
business but my own (except maybe at work, where they still don't become
your bussiness).
but is there some workaround it?
No, that probably would be a security issue. (Indeed, if security on an
IE browser was set so low that you could instantiate a windows scripting
host ActiveX instance then you could go and get the home page
information out of the user's registry, install any spyware you wanted,
upload the contents of and then re-format their hard discs, and so on.)

Richard.

Aug 5 '07 #3
Gabriella wrote:
I would like to know how to find out which is the browser's "home"
URL?
You can not.
This is so I'll be able to suggest "set as homepage" for my website,
only for those who did not set it beforehand.
You should not.
I know there's a security issue with this, but is there some
workaround it?
There is not.
HTH

PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Aug 5 '07 #4
Hi

You can invite the user to set your site as their home page, but you cannot
know what their homepage is.

<font face="arial" size="1">
<a href="#" onClick="this.style.behavior='url(#default#homepag e)';
this.setHomePage('http://www.xyz.com');">Set xyz.com as Homepage
</a>
</font>

Regards
John


Aug 6 '07 #5
John said the following on 8/6/2007 4:15 AM:
Hi

You can invite the user to set your site as their home page, but you cannot
know what their homepage is.

<font face="arial" size="1">
I thought the web migrated beyond HTML3.2 in the last century.
<a href="#" onClick="this.style.behavior='url(#default#homepag e)';
this.setHomePage('http://www.xyz.com');">Set xyz.com as Homepage
</a>
Breaks for me in at least 3 different browsers.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 6 '07 #6
John wrote:
You can invite the user to set your site as their home page, but you cannot
know what their homepage is.

<font face="arial" size="1">
Wake up, CSS 2 is there since more than 9 years.
<a href="#" onClick="this.style.behavior='url(#default#homepag e)';
this.setHomePage('http://www.xyz.com');">Set xyz.com as Homepage
</a>
This will result almost always in a runtime error. Either because
`this.style' (implemented as a CSSStyleDeclaration object) has no `behavior'
property (as that is MSHTML-proprietary), or because HTMLAnchorElement
objects have no setHomePage() method, or because this method is not allowed
to be called due to security restrictions. Or it would not work at all
because client-side scripting is disabled or not even supported.
</font>
This must be one of the worst examples I have seen to date.
PointedEars
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Aug 6 '07 #7
Gabriella wrote:
>
I would like to know how to find out which is the browser's "home"
URL?
This is so I'll be able to suggest "set as homepage" for my website,
only for those who did not set it beforehand.
I know there's a security issue with this, but is there some
workaround it?
You ask them - and they probably refuse to tell you. In short, forget
the whole idea.
Aug 6 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gil | last post by:
I am trying to code my "notfound.html" page when people click on the link that will send them back to home page, that the "entire" browser is "refreshed". Reason for doing this. I have frames...
4
by: Q | last post by:
Hello, I have composed the following simple php file: <html> <head><title> Title. </title></head> <body> <?php header("Location: http://www.something.com/tmp2.php"); ?> </body>
4
by: Luca T. | last post by:
Hello, i need a way to find the home folder of the current user no matter if i am in Linux or Windows for instance: * Linux: /home/username * Windows: C:\Documents and Settings\username Is...
4
by: Ed | last post by:
Hello All, I posted earlier about a problem I was having with editing or pasting/deleting files in the "Home Directory" of my web server. I just noticed that the "Home Directory" option in the...
2
by: Simon Wigzell | last post by:
What is the call? Better yet is there a link to a page that describes all the possible javascript calls to the various browser menu items and explains compatibility across different browsers?...
17
by: black tractor | last post by:
HI there.. l was just wondering, if l place a "table" in the "editable region" of my template, will the text, graphics placed inside the this "table" MOVE BY ITSELF?? l mean, recently l had a...
1
by: Kenjis Kaan | last post by:
I had to run DB2 on Win2k. After installation it puts a directory under c:\DB2 and c:\DB2Log and C:\Program Files\SQLLIB Now am all confused which is instance home, db2 home etc. I had to...
11
by: Will | last post by:
I am looking at using a table with user names, passwords and user rights, which I would administer. I have read a lot about the shortfalls of this and the lack of security but the customer does...
4
by: spoken | last post by:
Hi, How can I link to "home.htm?id=1" ? I have tried to use getURL("home.htm%3Fid-=1") and getURL("home.htm?id-=1") but it doesn't work because flash looks for the physical file which doesn't...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.