You are here: Re: OT: Php hash « HTML « IT news, forums, messages
Re: OT: Php hash

Posted by Neredbojias on 07/14/07 01:20

Well bust mah britches and call me cheeky, on Fri, 13 Jul 2007 15:30:21
GMT Jonathan N. Little scribed:

> Neredbojias wrote:
>> Well bust mah britches and call me cheeky, on Fri, 13 Jul 2007
>> 03:38:47 GMT Jonathan N. Little scribed:
>>
>>> Neredbojias wrote:
>
>> That is exactly the effect I am experiencing, but....
>>
>> The server *has to* receive it somehow, not so?, for how else does it
>> get to the visitor's userAgent?
>>
> It doesn't as Toby says. The fragment is stripped off by the UA and is
> stored in the UA's memory. The server only receives the
> scheme, host, port, [user], [password], path, and [query]
> then when the page loads the UA uses the stored fragment to find the
> hash on the page if it exists.

Yes, I see that's correct. Somehow I had it in my head that the server
had to send it to the visitor's browser as an _entity_ (I suppose you'd
say.} Not so, of course.

> You can see this in action by tailing the access_log of a web server.
> For example on my site the URL:
>
> http://www.littleworksstudio.com/gallery.php?sr=10&byid=ckcs#BMckcs0223
>
> shows as:
>
> ###.###.###.### - - [13/Jul/2007:11:22:04 -0400] "GET
> /gallery.php?sr=10&byid=ckcs HTTP/1.1" 200 30228 "-" "Mozilla/5.0
> (Windows; U; Windows NT 5.0; en-US; rv:
> 1.8.1.4) Gecko/20070509 SeaMonkey/1.1.2 Mnenhy/0.7.5.0"
>
> Note the missing fragment "#BMckcs0223"

Yep. Very insightful.

> I came across this a while back when I converted an old JavaScript
> navigation management system to PHP which generated the breadcrumb
> trail.
>
> I did read some discussion on including the fragment in server-side
> processing, but who knows if it will ever change.
>
> A workaround is to pass as query string value and convert to a
> fragment as BTS suggested.

Nope, no query strings. _Adding_ one reloads the page in a way I don't
like. What I finally resigned myself to was a current-session, non-
written cookie with my previous old system as backup. The cookie seems
to work perfectly; the backup most of the time. (What goes wrong there
is hard to explain, but it's nothing invalid or errorwise. I "lose" the
hash, that's all.)

Thanks again for all the help.

--
Neredbojias
A self-made man who worships his creator

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация