0

I Want to pass a parameter in the end of the url, that will not affect anything before it, no matter what's the query string include.

Example:

Consider i have the following url's:

1) domain.com?a=b
2) domain.com?a=b&c=d
3) domain.com/#header

I want to insert my parameter in the end of each url, and always in the same method, like this:

1) domain.com?a=b[MYPARAM=123]
2) domain.com?a=b&c=d[MYPARAM=123]
3) domain.com/#header[MYPARAM=123]

i want the browser to completely ignore the additional parameter, and only make some actions with it in the server side. (in example 3, the browser will think that i want to get to an element with id #header[MYPARAM=123] inside the page, so it's not good.)

is there some prefix that i can use to tell the browser to ignore it and only make actions to it in the server?

Thanks.

daren1212
  • 25
  • 1
  • 7
  • Why do you need to do this? Why can't you use a normal parameter? Normal parameters generally don't affect the client and are generally only used by the server. – Riley Major Apr 28 '14 at 18:36

1 Answers1

0

Why don't you simply pass it as a query parameter like the others:

1) domain.com?a=b&MYPARAM=123
2) domain.com?a=b&c=d&MYPARAM=123
3) domain.com/?MYPARAM=123#header
a.benain
  • 174
  • 8
  • example 3 won't work, because the #header should scroll to the header section of the page, and the ?MYPARAM=123 will ruin it... – daren1212 Apr 28 '14 at 16:58
  • then use domain.com/?MYPARAM=123#header for case 3 – a.benain Apr 28 '14 at 17:04
  • Example 3 is incorrect usage. [The fragment identifier introduced by a hash mark # is the optional last part of a URL for a document.](http://superuser.com/a/498625) – Riley Major Apr 28 '14 at 17:04