views:

67

answers:

2

For example if I type in the URL:

http://www.foo.com/page.php?parameter=kickme#MOREURL

In the server isn't the part: #MOREURL

Is possible to send or get these part to the server without jQuery AJAX?.

Thanks

+2  A: 

http://tools.ietf.org/html/rfc2396#section-4

When a URI reference is used to perform a retrieval action on the identified resource, the optional fragment identifier, separated from the URI by a crosshatch ("#") character, consists of additional reference information to be interpreted by the user agent after the retrieval action has been successfully completed. As such, it is not part of a URI, but is often used in conjunction with a URI.

meder
In conclusion, #MOREURL is not sent to the server? Only using jQuery/AJAX/Javascript methods.
Cris Hong Kong CRISHK
jQuery and AJAX have nothing to do with this. It's only accessible via Javascript or possibly another client side scripting language. Not server side.
meder
OK Not server SIDE!, THANKS!
Cris Hong Kong CRISHK
@user439866: A hash is almost like an extension number in a phone system. It's "receiver side." You dial the phone number and then the extension - but the extension isn't actually part of the phone number (unless its some sort of direct dial system) - the extension is an "extra" part that is processed separately by the receiving phone system. I actually don't know much about how phone systems work, so this analogy may be incorrect.
CD Sanchez
+1  A: 

No, it is available to the browser only, so you have to deal it with Javascript. The server can not read it.

Explanation:
Basically the hash component of the page URL (the part following the # sign) is processed by the browser only - the browser never passes it to the server. This sadly is part of the HTML standard and is the same whether or not you are using IE or any other browser (and for that matter PHP or any other server side technology).

Here's what Wikipedia says about it:

The fragment identifier functions differently than the rest of the URI: namely, its processing is exclusively client-side with no participation from the server. When an agent (such as a Web browser) requests a resource from a Web server, the agent sends the URI to the server, but does not send the fragment. Instead, the agent waits for the server to send the resource, and then the agent processes the resource according to the fragment value. In the most common case, the agent scrolls a Web page down to the anchor element which has an attribute string equal to the fragment value. Other client behaviors are possible

shamittomar