|
Posted by Anoop Ghanwani on July 26, 2004, 12:48 am
Please log in for more thread options
In my public_html directory, I have a bunch of files:
index.html
x.html, y.html, etc.
When a user accesses the domain without a file name,
he/she automatically accesses the index.html file.
So, we he/she goes to x.html or y.html, I have
back-pointers to index.html.
I was using:
<a href="">Back to the homepage</a>.
This worked fine in Internet Explorer, but in Firefox
it basically takes the user back to the top of the current
page. To make things work with Firefox I end having to say:
<a href="full original domain name without the index.html">Back to
my homepage</a>.
Is this:
(a) A problem with Firefox?
(b) A problem with my html code that ends up having unpredictable
results depending on the browser type?
Anoop
|
|
Posted by David Dorward on July 26, 2004, 9:02 am
Please log in for more thread options
Anoop Ghanwani wrote:
> I was using:
> <a href="">Back to the homepage</a>.
> This worked fine in Internet Explorer, but in Firefox
> it basically takes the user back to the top of the current
> page.
> (a) A problem with Firefox?
AFAIK, the behavour of browsers for null URIs is undefined.
> (b) A problem with my html code that ends up having unpredictable
> results depending on the browser type?
Use href="/", "./", "index.html", or "/index.html"
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/> Home is where the ~/.bashrc is
|
|
Posted by Jukka K. Korpela on July 28, 2004, 9:14 pm
Please log in for more thread options
> AFAIK, the behavour of browsers for null URIs is undefined.
In HTML, "URI" effectively stands for what RFC 2396 calls "URI reference"
(otherwise you could not use href="#foo" to refer to a location inside
the same document), and RFC 2396 specifies:
"4.2. Same-document References
A URI reference that does not contain a URI is a reference to the current
document. In other words, an empty URI reference within a document is
interpreted as a reference to the start of that document, and a reference
containing only a fragment identifier is a reference to the identified
fragment of that document. Traversal of such a reference should not
result in an additional retrieval action. However, if the URI reference
occurs in a context that is always intended to result in a new request,
as in the case of HTML's FORM element, then an empty URI reference
represents the base URI of the current document and should be replaced by
that URI when transformed into a request."
And URI reference is defined syntactically as
[ absoluteURI | relativeURI ] [ # fragment ]
so it can be an empty string.
However, I would not count on that, since browsers are known to fail to
comply with this, and it's an odd concept anyway.
--
Yucca, http://www.cs.tut.fi/~jkorpela/ Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
|
|
Posted by Mark Tranchant on July 26, 2004, 9:04 am
Please log in for more thread options Anoop Ghanwani wrote:
> In my public_html directory, I have a bunch of files:
> index.html
> x.html, y.html, etc.
>
> When a user accesses the domain without a file name,
> he/she automatically accesses the index.html file.
> So, we he/she goes to x.html or y.html, I have
> back-pointers to index.html.
>
> I was using:
> <a href="">Back to the homepage</a>.
> This worked fine in Internet Explorer, but in Firefox
> it basically takes the user back to the top of the current
> page. To make things work with Firefox I end having to say:
> <a href="full original domain name without the index.html">Back to
> my homepage</a>.
>
> Is this:
> (a) A problem with Firefox?
> (b) A problem with my html code that ends up having unpredictable
> results depending on the browser type?
<a href=""> means nothing. IE happens to interpret it as you want. You
could use <a href="index.html"> or <a href="/">.
--
Mark.
|
|
Posted by Steve Pugh on July 26, 2004, 9:33 am
Please log in for more thread options ghanwani@gmail.com (Anoop Ghanwani) wrote:
>In my public_html directory, I have a bunch of files:
>index.html
>x.html, y.html, etc.
>
>When a user accesses the domain without a file name,
>he/she automatically accesses the index.html file.
>So, we he/she goes to x.html or y.html, I have
>back-pointers to index.html.
>
>I was using:
><a href="">Back to the homepage</a>.
Oh dear. The behaviour of empty URLs as links is undefined.
>This worked fine in Internet Explorer, but in Firefox
>it basically takes the user back to the top of the current
>page. To make things work with Firefox I end having to say:
><a href="full original domain name without the index.html">Back to
>my homepage</a>.
Why? Why not just <a href="index.html">My homepage</a> or
<a href="/">My homepage</a> ?
(Drop the 'back to' as the user may have arrived at your page via a
search engine or bookmark and thus might not be going 'back' at all.)
>Is this:
>(a) A problem with Firefox?
>(b) A problem with my html code that ends up having unpredictable
> results depending on the browser type?
(b)
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
|
| Similar Threads | Posted | | Index - Home Page | July 10, 2004, 11:59 am |
| search engines indexing robots/crawlers - how long does it take to index a page? | August 30, 2006, 9:11 am |
| Need help creating a "Click absolutely ANYWHERE on this page" link for an HTML page with no content | February 7, 2007, 5:40 pm |
| Grammer teachers - a html page or an html page | September 27, 2004, 10:53 pm |
| how to reference an html page from another html page | March 7, 2008, 12:43 pm |
| Activating parent page link from 'child page' - revised | June 3, 2005, 11:30 am |
| extract page structure from page source? | September 19, 2006, 1:46 pm |
| how to make a link to an old page go to a new page without displaying anything | August 20, 2007, 3:08 am |
| Update a web page with contents from another web page. | January 8, 2005, 1:59 pm |
| I would like to sell my web page - You can run your own business with this web page! | June 6, 2007, 4:24 pm |
|