Viewed   74 times

For example if I type in the URL:

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

Then on the server there is no part: #MOREURL

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

 Answers

2

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

Wednesday, September 28, 2022
5

Check out: jQuery BBQ

jQuery BBQ is designed for parsing things from the url (query string or fragment), and goes a bit farther to simplify fragment-based history. This is the jQuery plugin Yarin was looking for before he put together a pure js solution. Specifically, the deparam.fragment() function does the job. Have a look!

(The support site I'm working on uses an asynchronous search, and because BBQ makes it trivial to tuck entire objects into the fragment I use it to 'persist' my search parameters. This gives my users history states for their searches, and also allows them to bookmark useful searches. Best of all, when QA finds a search defect they can link straight to the problematic results!)

Saturday, December 3, 2022
1

The answer to this question is similar to the answers for /questions/774136. Basically, according to the standard @ faqs.org/rfcs/rfc1808.html (see Section 2.4.1) it says: ""Note that the fragment identifier is not considered part of the URL." As "stephbu" pointed out, "the anchor tag is never sent as part of the HTTP request by any browser, it is only interpreted locally within the browser".

Sunday, September 25, 2022
 
rubbic
 
1

HashMap uses writeObject and readObject to implement custom serialization rather than just letting its field be serialized normally. It writes the number of buckets, the total size and each of the entries to the stream and rebuilds itself from those fields when deserialized. As tzaman says, the table itself is unnecessary in the serial form, so it's not serialized to save space.

You can read more about those methods and some other methods of doing custom serialization (writeReplace and readResolve) in the Serializable javadoc.

Wednesday, October 26, 2022
 
4

Some online articles says, that there is no standard for querystring and hash in URL

Either they are wrong or you are misinterpreting them.

The query string must appear before the fragment identifier (which you call the hash).

The specification shows the format of a URI:

URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

It clearly shows the fragment appearing after the query.

if hash follows querystring, it can become a value to some querystring data

It can't. The # is a special character that indicates the start of the fragment. To include one in query string data it needs to be escaped as %23.

Tuesday, December 20, 2022
 
maydin
 
Only authorized users can answer the search term. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :
 
Share