FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » browser url with #...
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
browser url with #... [message #172646] Wed, 23 February 2011 08:47 Go to next message
Vincenzo Scarpa is currently offline  Vincenzo Scarpa
Messages: 1
Registered: February 2011
Karma: 0
Junior Member
Hi,

with this code I get the address of the browser:
$url = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];

but with this address:
http://www.example.com/example.php#one

the code above does not work ($url contains only 'http://
www.example.com/example.php').

How come? :(

Thanks
Vincenzo
Re: browser url with #... [message #172647 is a reply to message #172646] Wed, 23 February 2011 09:26 Go to previous messageGo to next message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma: 0
Senior Member
On 2/23/2011 9:47 AM, Vincenzo Scarpa wrote:
> Hi,
>
> with this code I get the address of the browser:
> $url = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
>
> but with this address:
> http://www.example.com/example.php#one
>
> the code above does not work ($url contains only 'http://
> www.example.com/example.php').
>
> How come? :(

Simple, because $_SERVER['REQUEST_URI'] doesn't contain the hash (#).

A hash is used to point to a certain point in the document.
I am not even sure it is send to the server at all (I think not).

If you want PHP to know about your #one, send it in the URL like this:

http://www.example.com/example.php?myInfo=one

Then from PHP, use superglobal $_GET to fetch the information:
$_GET["myInfo"] <-- will contain 'one'

You can also combine the Querystring info with a hash:

http://www.example.com/example.php?myInfo=one#one

Regards,
Erwin Moller

>
> Thanks
> Vincenzo
>
>
>


--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
Re: browser url with #... [message #172648 is a reply to message #172646] Wed, 23 February 2011 09:41 Go to previous messageGo to next message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma: 0
Senior Member
On 23-02-11 09:47, Vincenzo Scarpa wrote:
> Hi,
>
> with this code I get the address of the browser:
> $url = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
>
> but with this address:
> http://www.example.com/example.php#one
>
> the code above does not work ($url contains only 'http://
> www.example.com/example.php').
>
> How come? :(
>
> Thanks
> Vincenzo
>
>
>

Google for: php hash in url

First link, gives explanation
http://stackoverflow.com/questions/940905/can-php-read-the-hash-portion-of- the-url

--
Luuk
Re: browser url with #... [message #172650 is a reply to message #172647] Wed, 23 February 2011 13:02 Go to previous messageGo to next message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma: 0
Senior Member
On 2/23/2011 4:26 AM, Erwin Moller wrote:
> On 2/23/2011 9:47 AM, Vincenzo Scarpa wrote:
>> Hi,
>>
>> with this code I get the address of the browser:
>> $url = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
>>
>> but with this address:
>> http://www.example.com/example.php#one
>>
>> the code above does not work ($url contains only 'http://
>> www.example.com/example.php').
>>
>> How come? :(
>
> Simple, because $_SERVER['REQUEST_URI'] doesn't contain the hash (#).
>
> A hash is used to point to a certain point in the document.
> I am not even sure it is send to the server at all (I think not).
>
> If you want PHP to know about your #one, send it in the URL like this:
>
> http://www.example.com/example.php?myInfo=one
>
> Then from PHP, use superglobal $_GET to fetch the information:
> $_GET["myInfo"] <-- will contain 'one'
>
> You can also combine the Querystring info with a hash:
>
> http://www.example.com/example.php?myInfo=one#one
>
> Regards,
> Erwin Moller
>
>>
>> Thanks
>> Vincenzo
>>
>>
>>
>
>

parse_url will get the stuff after the #.

--
Shelly
Re: browser url with #... [message #172652 is a reply to message #172646] Wed, 23 February 2011 13:06 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Vincenzo Scarpa wrote:

> with this code I get the address of the browser:
> $url = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
>
> but with this address:
> http://www.example.com/example.php#one
>
> the code above does not work ($url contains only 'http://
> www.example.com/example.php').
>
> How come? :(

Fragment identifiers are not part of the HTTP request, they are used
client-side only.


PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Re: browser url with #... [message #172653 is a reply to message #172650] Wed, 23 February 2011 13:19 Go to previous messageGo to next message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma: 0
Senior Member
On 2/23/2011 2:02 PM, sheldonlg wrote:
> On 2/23/2011 4:26 AM, Erwin Moller wrote:
>> On 2/23/2011 9:47 AM, Vincenzo Scarpa wrote:
>>> Hi,
>>>
>>> with this code I get the address of the browser:
>>> $url = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
>>>
>>> but with this address:
>>> http://www.example.com/example.php#one
>>>
>>> the code above does not work ($url contains only 'http://
>>> www.example.com/example.php').
>>>
>>> How come? :(
>>
>> Simple, because $_SERVER['REQUEST_URI'] doesn't contain the hash (#).
>>
>> A hash is used to point to a certain point in the document.
>> I am not even sure it is send to the server at all (I think not).
>>
>> If you want PHP to know about your #one, send it in the URL like this:
>>
>> http://www.example.com/example.php?myInfo=one
>>
>> Then from PHP, use superglobal $_GET to fetch the information:
>> $_GET["myInfo"] <-- will contain 'one'
>>
>> You can also combine the Querystring info with a hash:
>>
>> http://www.example.com/example.php?myInfo=one#one
>>
>> Regards,
>> Erwin Moller
>>
>>>
>>> Thanks
>>> Vincenzo
>>>
>>>
>>>
>>
>>
>
> parse_url will get the stuff after the #.
>

Hi,

I think parse_url() only works if you feed it an URL that contains the hash.
The problem is that is isn't send to the server at all (I think).

Regards,
Erwin Moller

--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
Re: browser url with #... [message #172654 is a reply to message #172650] Wed, 23 February 2011 14:09 Go to previous messageGo to next message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma: 0
Senior Member
.oO(sheldonlg)

> parse_url will get the stuff after the #.

Usually not. The # separates the URL from the fragment identifier, which
doesn't belong to the URL. It is handled on the client-side only and not
sent to the server.

Micha
Re: browser url with #... [message #172655 is a reply to message #172650] Wed, 23 February 2011 14:49 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
sheldonlg wrote:

> On 2/23/2011 4:26 AM, Erwin Moller wrote:
>> If you want PHP to know about your #one, send it in the URL like this:
>>
>> http://www.example.com/example.php?myInfo=one
>>
>> Then from PHP, use superglobal $_GET to fetch the information:
>> $_GET["myInfo"] <-- will contain 'one'

ACK. But that is not the same.

>> You can also combine the Querystring info with a hash:
>>
>> http://www.example.com/example.php?myInfo=one#one

The `#' and everything that follows will _not_ reach the server. One would
need to URL-encode the `#' *in the request URI* (%23), which would defeat
its client-side purpose as delimiter for the fragment identifier.

> parse_url will get the stuff after the #.

No, it will not *here*, because there is nothing for it to get.

Please trim your quotes to the relevant minimum.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Re: browser url with #... [message #172656 is a reply to message #172655] Wed, 23 February 2011 16:30 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Thomas 'PointedEars' Lahn wrote:

> sheldonlg wrote:
>> On 2/23/2011 4:26 AM, Erwin Moller wrote:
>>> You can also combine the Querystring info with a hash:
>>>
>>> http://www.example.com/example.php?myInfo=one#one
>
> The `#' and everything that follows will _not_ reach the server. One
> would need to URL-encode the `#' *in the request URI* (%23), which would
> defeat its client-side purpose as delimiter for the fragment identifier.

Sorry, I misunderstood the approach duplicating the data for the server
side.


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> (404-comp.)
Re: browser url with #... [message #172657 is a reply to message #172653] Wed, 23 February 2011 14:41 Go to previous messageGo to next message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma: 0
Senior Member
On 2/23/2011 8:19 AM, Erwin Moller wrote:
> On 2/23/2011 2:02 PM, sheldonlg wrote:
>> On 2/23/2011 4:26 AM, Erwin Moller wrote:
>>> On 2/23/2011 9:47 AM, Vincenzo Scarpa wrote:
>>>> Hi,
>>>>
>>>> with this code I get the address of the browser:
>>>> $url = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
>>>>
>>>> but with this address:
>>>> http://www.example.com/example.php#one
>>>>
>>>> the code above does not work ($url contains only 'http://
>>>> www.example.com/example.php').
>>>>
>>>> How come? :(
>>>
>>> Simple, because $_SERVER['REQUEST_URI'] doesn't contain the hash (#).
>>>
>>> A hash is used to point to a certain point in the document.
>>> I am not even sure it is send to the server at all (I think not).
>>>
>>> If you want PHP to know about your #one, send it in the URL like this:
>>>
>>> http://www.example.com/example.php?myInfo=one
>>>
>>> Then from PHP, use superglobal $_GET to fetch the information:
>>> $_GET["myInfo"] <-- will contain 'one'
>>>
>>> You can also combine the Querystring info with a hash:
>>>
>>> http://www.example.com/example.php?myInfo=one#one
>>>
>>> Regards,
>>> Erwin Moller
>>>
>>>>
>>>> Thanks
>>>> Vincenzo
>>>>
>>>>
>>>>
>>>
>>>
>>
>> parse_url will get the stuff after the #.
>>
>
> Hi,
>
> I think parse_url() only works if you feed it an URL that contains the
> hash.
> The problem is that is isn't send to the server at all (I think).
>
> Regards,
> Erwin Moller

Right. I missed that.

--
Shelly
Re: browser url with #... [message #172658 is a reply to message #172646] Thu, 24 February 2011 01:56 Go to previous messageGo to next message
Twayne is currently offline  Twayne
Messages: 135
Registered: September 2010
Karma: 0
Senior Member
In news:005f27a6-38e1-49f4-bd45-2529005aacf4(at)y3g2000vbh(dot)googlegroups(dot)com,
Vincenzo Scarpa <vincenzoscarpa613(at)gmail(dot)com> typed:
:: Hi,
::
:: with this code I get the address of the browser:
:: $url =
:: 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
::
:: but with this address:
:: http://www.example.com/example.php#one
::
:: the code above does not work ($url contains only 'http://
:: www.example.com/example.php').
::
:: How come? :(
::
:: Thanks
:: Vincenzo

# indicates a bookmark in the document at the URL. If there is no such
bookmark, then it cannot go there and fails.
Re: browser url with #... [message #173185 is a reply to message #172658] Sat, 26 March 2011 17:24 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Twayne wrote:

> Vincenzo Scarpa typed:
> :: with this code I get the address of the browser:
> :: $url =
> :: 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
> ::
> :: but with this address:
> :: http://www.example.com/example.php#one
> ::
> :: the code above does not work ($url contains only 'http://
> :: www.example.com/example.php').
> ::
> :: How come? :(
> ::
> :: Thanks
> :: Vincenzo
>
> # indicates a bookmark in the document at the URL.

It does not.

> If there is no such bookmark, then it cannot go there and fails.

Bookmarks have nothing to do with this; that misconception aside,
you are correct, but you are missing the point.

Please <http://netmeister.org/news/learn2quote.html>.


PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7(at)news(dot)demon(dot)co(dot)uk> (2004)
Re: browser url with #... [message #173187 is a reply to message #173185] Sat, 26 March 2011 18:39 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 3/26/2011 1:24 PM, Thomas 'PointedEars' Lahn wrote:
> Twayne wrote:
>
>> Vincenzo Scarpa typed:
>> :: with this code I get the address of the browser:
>> :: $url =
>> :: 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
>> ::
>> :: but with this address:
>> :: http://www.example.com/example.php#one
>> ::
>> :: the code above does not work ($url contains only 'http://
>> :: www.example.com/example.php').
>> ::
>> :: How come? :(
>> ::
>> :: Thanks
>> :: Vincenzo
>>
>> # indicates a bookmark in the document at the URL.
>
> It does not.
>
>> If there is no such bookmark, then it cannot go there and fails.
>
> Bookmarks have nothing to do with this; that misconception aside,
> you are correct, but you are missing the point.
>
> Please<http://netmeister.org/news/learn2quote.html>.
>
>
> PointedEars

Wrong again. But that's pretty normal for you.

And I know I'm not quoting like YOU want. And I don't give a flying frick.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: browser url with #... [message #173205 is a reply to message #173187] Sun, 27 March 2011 10:27 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Jerry Stuckle wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Twayne wrote:
>>> Vincenzo Scarpa typed:
>>> :: with this code I get the address of the browser:
>>> :: $url =
>>> :: 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
>>> ::
>>> :: but with this address:
>>> :: http://www.example.com/example.php#one
>>> ::
>>> :: the code above does not work ($url contains only 'http://
>>> :: www.example.com/example.php').
>>> ::
>>> :: How come? :(
>>> ::
>>> :: Thanks
>>> :: Vincenzo
>>>
>>> # indicates a bookmark in the document at the URL.
>>
>> It does not.
>>
>>> If there is no such bookmark, then it cannot go there and fails.
>>
>> Bookmarks have nothing to do with this; that misconception aside,
>> you are correct, but you are missing the point.
>
> Wrong again. [snip ad-hominem attack]

Bookmarks have exactly *nothing* to do with this: Using such an URL, it will
be navigated to an *anchor* in the document even if there is no
corresponding bookmark in the user's bookmarks file or folder.

"Twayne" has a misconception about what a bookmark is, and so have you.

Get informed:
- <http://en.wikipedia.org/wiki/Bookmark_(World_Wide_Web)>
- <http://en.wikipedia.org/wiki/Fragment_identifier>

"Twayne" is missing the point because the reason for the OP's problem is not
that a "bookmark" (in that wrong sense) cannot be found, but because the
fragment identifier is not part of the *request* URI (as we have already
discussed).

> And I know I'm not quoting like YOU want.

The quoting style I am *asking* (you) *for* is not different from what is
customary on Usenet and what corresponds with common sense. But I can see
how the concepts of basic politeness, of writing for one's readers, and of
common sense might be challenging to you.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(at)news(dot)demon(dot)co(dot)uk>
Re: browser url with #... [message #173206 is a reply to message #173205] Sun, 27 March 2011 12:25 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 3/27/2011 6:27 AM, Thomas 'PointedEars' Lahn wrote:
> Jerry Stuckle wrote:
>
>> Thomas 'PointedEars' Lahn wrote:
>>> Twayne wrote:
>>>> Vincenzo Scarpa typed:
>>>> :: with this code I get the address of the browser:
>>>> :: $url =
>>>> :: 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
>>>> ::
>>>> :: but with this address:
>>>> :: http://www.example.com/example.php#one
>>>> ::
>>>> :: the code above does not work ($url contains only 'http://
>>>> :: www.example.com/example.php').
>>>> ::
>>>> :: How come? :(
>>>> ::
>>>> :: Thanks
>>>> :: Vincenzo
>>>>
>>>> # indicates a bookmark in the document at the URL.
>>>
>>> It does not.
>>>
>>>> If there is no such bookmark, then it cannot go there and fails.
>>>
>>> Bookmarks have nothing to do with this; that misconception aside,
>>> you are correct, but you are missing the point.
>>
>> Wrong again. [snip ad-hominem attack]
>
> Bookmarks have exactly *nothing* to do with this: Using such an URL, it will
> be navigated to an *anchor* in the document even if there is no
> corresponding bookmark in the user's bookmarks file or folder.
>
> "Twayne" has a misconception about what a bookmark is, and so have you.
>
> Get informed:
> -<http://en.wikipedia.org/wiki/Bookmark_(World_Wide_Web)>
> -<http://en.wikipedia.org/wiki/Fragment_identifier>
>
> "Twayne" is missing the point because the reason for the OP's problem is not
> that a "bookmark" (in that wrong sense) cannot be found, but because the
> fragment identifier is not part of the *request* URI (as we have already
> discussed).
>
>> And I know I'm not quoting like YOU want.
>
> The quoting style I am *asking* (you) *for* is not different from what is
> customary on Usenet and what corresponds with common sense. But I can see
> how the concepts of basic politeness, of writing for one's readers, and of
> common sense might be challenging to you.
>
>
> PointedEars


Once again, the troll has no idea what he's talking about. But he has
to open his mouth anyway.

And you should learn to take your own advice on quoting before trying to
lecture others (who don't give a damn what you want). But then that's
also so typical of a troll.




--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: browser url with #... [message #173233 is a reply to message #173205] Mon, 28 March 2011 21:00 Go to previous messageGo to next message
Twayne is currently offline  Twayne
Messages: 135
Registered: September 2010
Karma: 0
Senior Member
In news:2516140(dot)VqM8IeB0Os(at)PointedEars(dot)de,
Thomas 'PointedEars' Lahn <PointedEars(at)web(dot)de> typed:
> Jerry Stuckle wrote:
>
>> Thomas 'PointedEars' Lahn wrote:
>>> Twayne wrote:

.....

>
> "Twayne" has a misconception about what a bookmark is,
> and so have you.

Actually, I have no misconceptions at all. In two of the particular programs
I use, they call the "#" to be a bookmark regardless of how it's used, and
to create such a link, the menu item is to Insert; Bookmark. A LOT of
wysiwyg programs use the same terminology. Thus, if an external site lets
you know where there is a "bookmark" (and that's what they call it on those
sites), you can send a surfer right to the "bookmarked" location within the
file using the "#" sign.

Rather than concentrate on the question that was asked, you decided to
debate the labelling for an octothorpe in this context. So, a sensibe answer
might have been that, more technically, it's called ... in order to be most
accurate.

>

....

> "Twayne" is missing the point because the reason for the
> OP's problem is not that a "bookmark" (in that wrong
> sense) cannot be found, but because the fragment
> identifier is not part of the *request* URI (as we have
> already discussed).

No - if the "#", or bookmark, or misnomered "fragment identifier" as you
prefer, as far as I'm concerned, I like to use the clearest acceptable
language possible. You on the other hand appear as though rather than adding
information, you want to dismiss perfectly good information and restate the
very same thing in more technical language that a LOT few people will
understand.
>
>> And I know I'm not quoting like YOU want.
>
> The quoting style I am *asking* (you) *for* is not
....
The quoting style you felt it necessary to mention did no harm to the post;
it was quite clear what was response and what wasn't. Your comment there was
totally uncalled for but if you just had to say something, why couldn't you
take what appears to be a newbie under your wing and politely try to help
them? You're a lousy poster and I imagine just as irritating to those around
you as you try to be here.

Oh, and why the nick change?
--
HTH,

Twayne`
>>
>
> PointedEars
Re: browser url with #... [message #173234 is a reply to message #173233] Mon, 28 March 2011 21:33 Go to previous messageGo to next message
Gregor Kofler is currently offline  Gregor Kofler
Messages: 69
Registered: September 2010
Karma: 0
Member
Am 2011-03-28 23:00, Twayne meinte:

> No - if the "#", or bookmark, or misnomered "fragment identifier" as you
> prefer, as far as I'm concerned, I like to use the clearest acceptable
> language possible. You on the other hand appear as though rather than adding
> information, you want to dismiss perfectly good information and restate the
> very same thing in more technical language that a LOT few people will
> understand.

The # *is* the fragment identifier. It's no "bookmark" - no matter what
some wacky WYSIWYG programs state. And in a newsgroup dealing with
technical issues precise terms help to avoid "discussions" like this one.

Gregor

--
http://vxweb.net
Re: browser url with #... [message #173235 is a reply to message #173233] Mon, 28 March 2011 22:03 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 3/28/2011 5:00 PM, Twayne wrote:
> In news:2516140(dot)VqM8IeB0Os(at)PointedEars(dot)de,
> Thomas 'PointedEars' Lahn<PointedEars(at)web(dot)de> typed:
>> Jerry Stuckle wrote:
>>
>>> Thomas 'PointedEars' Lahn wrote:
>>>> Twayne wrote:
>
> ....
>
>>
>> "Twayne" has a misconception about what a bookmark is,
>> and so have you.
>
> Actually, I have no misconceptions at all. In two of the particular programs
> I use, they call the "#" to be a bookmark regardless of how it's used, and
> to create such a link, the menu item is to Insert; Bookmark. A LOT of
> wysiwyg programs use the same terminology. Thus, if an external site lets
> you know where there is a "bookmark" (and that's what they call it on those
> sites), you can send a surfer right to the "bookmarked" location within the
> file using the "#" sign.
>
> Rather than concentrate on the question that was asked, you decided to
> debate the labelling for an octothorpe in this context. So, a sensibe answer
> might have been that, more technically, it's called ... in order to be most
> accurate.
>
>>
>
> ...
>
>> "Twayne" is missing the point because the reason for the
>> OP's problem is not that a "bookmark" (in that wrong
>> sense) cannot be found, but because the fragment
>> identifier is not part of the *request* URI (as we have
>> already discussed).
>
> No - if the "#", or bookmark, or misnomered "fragment identifier" as you
> prefer, as far as I'm concerned, I like to use the clearest acceptable
> language possible. You on the other hand appear as though rather than adding
> information, you want to dismiss perfectly good information and restate the
> very same thing in more technical language that a LOT few people will
> understand.

It is commonly used by web developers to identify a position within a
page - a "bookmark". This is different from the bookmark saved in your
web browser.

>>
>>> And I know I'm not quoting like YOU want.
>>
>> The quoting style I am *asking* (you) *for* is not
> ...
> The quoting style you felt it necessary to mention did no harm to the post;
> it was quite clear what was response and what wasn't. Your comment there was
> totally uncalled for but if you just had to say something, why couldn't you
> take what appears to be a newbie under your wing and politely try to help
> them? You're a lousy poster and I imagine just as irritating to those around
> you as you try to be here.
>
> Oh, and why the nick change?

And there was no nick change.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: browser url with #... [message #173419 is a reply to message #173234] Sat, 09 April 2011 07:39 Go to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Gregor Kofler wrote:

> Am 2011-03-28 23:00, Twayne meinte:
>> No - if the "#", or bookmark, or misnomered "fragment identifier" as you

The past (participle) form of the verb for using a misnomer is _misnamed_.

>> prefer, as far as I'm concerned, I like to use the clearest acceptable
>> language possible. You on the other hand appear as though rather than
>> adding information, you want to dismiss perfectly good information and
>> restate the very same thing in more technical language that a LOT few
>> people will understand.
>
> The # *is* the fragment identifier.

Actually, the `#' is (so to speak) the left-hand side fragment (identifier
component) _delimiter_, followed by the fragment identifier (which may be
empty). See also [RFC3986]:

| 3. Syntax Components
|
| The generic URI syntax consists of a hierarchical sequence of
| components referred to as the scheme, authority, path, query, and
| fragment.
|
| URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
| […]
| 3.5. Fragment
|
| The fragment identifier component of a URI allows indirect
| identification of a secondary resource by reference to a primary
| resource and additional identifying information. The identified
| secondary resource may be some portion or subset of the primary
| resource, some view on representations of the primary resource, or
| some other resource defined or described by those representations. A
| fragment identifier component is indicated by the presence of a
| number sign ("#") character and terminated by the end of the URI.
|
| fragment = *( pchar / "/" / "?" )
| […]

> It's no "bookmark" - no matter what some wacky WYSIWYG programs state. And
> in a newsgroup dealing with technical issues precise terms help to avoid
> "discussions" like this one.

Full ACK.

[The misconception, and the misnaming of the URI fragment
(component/identifier) as "bookmark" comes from the fact that fragments are
often used in one's bookmarks (which hold URIs), for example to keep a quick
reference to a specific message in a user-augmentable document resource:
<http://www.php.net/manual/en/introduction.php#76515>. But a bookmark can
also hold the URI <http://www.php.net/manual/en/introduction.php>, which
makes the aforementioned misconception and misnaming obvious.]


Regards,

PointedEars
___________
[RFC3986] T. Berners-Lee/R. Fielding/L. Masinter: RFC 3986/STD 66,
"Uniform Resource Identifier (URI): Generic Syntax",
January 2005. <http://tools.ietf.org/html/rfc3986>, p. 16 and 24.
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_unction.js:16
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to call external php script from html?
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 10:39:18 GMT 2024

Total time taken to generate the page: 0.02315 seconds