Why should I deliver? src = into link?

I feel stupid because I don't know this, but I see a lot of links in web pages, not this one:

<a href="http://foo.com/">

      

... they use this:

<a href="http://foo.com/?src=bar.com">

      

Now I understand what? src = says something that this referral is coming from bar.com, but I don't understand why this needs to be called explicitly. Can anyone shed some light on it for me? Is this something I need to include in my program generated links?

EDIT : Ok, sorry, I'm not clear enough. I understand the GET syntax with question mark and ampersand separated parameters. I am wondering what this special src parameter is? Why does one site link to another and apply the src parameter at the end, even though there is no indication that the target site is using it normally.

For example, on this page, hover over the screenshot. Link url http://moms4mom.com/?src=stackexchangesites

But moms4mom.com is our site. Passing the src parameter does nothing, so why include it?

+2


source to share


6 answers


There are several reasons why src is used explicitly. But in general, it is easier and more reliable to trust the query string to determine the referer [sic] than to trust the referent, since the latter is often violated, intentionally or not. On the other hand, browsers almost never terminate the query string in the URL, since this, unlike referenced ones, is very important for the pages to work. Also, the referrer is often done without any deliberate action on the part of the linking site, which some users dislike.



+3


source


The reason (I do this) is that popular analytics tools sometimes make it easier to filter by query strings than sources.



+2


source


There is no standard for the src parameter. Each site has its own, and usually it is on the site that receives the link to determine how it wants to read it (as usual this is the site that will pay per click).

+1


source


The second is a dynamic link, this is a url that another language (like ASP and PHP) interprets to do something like in those google urls, but I never used this site (foo.com) t a lot about this parameter.

0


source


Part after? this is the query string. Different sites use it for different things and it is usually used to pass information to the server-side code for that url, but it can also be used in javascript.

See Query String for details

0


source


Depending on how the site is processing its URL, you may or may not need to include this information.

This is passed to the website and the server can process it just like form input. Some sites require this - and build their navigation from one page, using nothing but the "extra" things that are subsequently transferred. If you create a link to such a site, it will be necessary.

In other cases, it is simply used to convey additional, unnecessary information (eg, advertisements, tracking information, etc.) ... In these cases, you can leave it.

Unfortunately, there is no way to find out without trying to remove the extra bits from the URL.


After reading some of your comments - I'll also say:

There is nothing special about the "src" field in the query string. The server can use it in any way. If you do not know specific information about the server, you cannot assume that it can be ignored.

0


source







All Articles