Ok 'cause I was seeing on W3Schools and it enlists on the "Attributes" table of <a> element the referrerpolicy attribute. So I want to know if this is possible and how it works.
Like W3C says :
The Referrer-Policy HTTP header governs which referrer information,
sent in the Referer header, should be included with requests made.
That mean that you can configure if the target website will have access to the referrer information.
For example: Use <a href="http://example.com" referrerpolicy="origin"> to only give access to the origin information to the target.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
Related
I am trying to collect the referrer URL in Google Tag Manager and I want it to include the referring path page. I want to do this because I have multiple links from the same domain pointing to one form. I want to track which page is bringing in the most form fills and so that I can trigger an email series based on which landing page they came from.
For example, I have 3 landing pages directing to one of my forms:
www.site1.com/first-page-path
www.site1.com/second-page-path
www.site1.com/third-page-path
When I check the referrer variable in Google Tag Manager, it simply displays the domain name as follows:
referrer: https://www.site1.com/
How do I collect the the full URL including the page path so that it shows up like this:
referrer: https://www.site1.com/second-page-path
Any help would be appreciated.
It's limit by the referrer policy. These days, browsers usually set very restrictive defaults for the referrer policies, so only the referring domain is sent.
If you can manage the other domain or you can give each page with different form url.
You can add some parameter at the form url and add proper setting in GTM to retrieve it.
In general, referrer has always been a bit unreliable, and is now so limited that you probably should not use it for business critical purposes.
Assume the url is
www.example.com
I'm trying to make a post request using Postman to the following API.
sample1, /sample2, ...,/sample10
I can't figure out what's that mean. Should I put api as key, and /sample1 in the params? Or put them in the header? Thanks
Your setup would be:
/sample1 sample10 are just parts of the url you're posting to. To add the header click on the header tab and add a key/value for the headers you want to send.
My index page is tri-lingual... in this scenario, W3 informs us that the original 'ID solution' was dropped, without a replacement......
W3 does suggest the use of HTTP headers, but fails to explain how this is accomplished.
Can stackoverflow solve this problem?
Background
W3 suggests that this code is not good/should not be used:
<meta http-equiv="Content-Language" content="de, fr, en">
However, they then say that there is nothing to replace it:
One implication of HTML5 dropping the meta element for declaring
language is that there is now no obvious way to provide metadata about
the document inside the document itself.
That's a painful statement, but... they then go on to suggest that "content-language" should be specified in a HTTP header.
This information is associated with a particular page by settings on
the server or by server-side scripting.
Fantastic... they even show a typical example... great!
HTTP/1.1·200·OK
Date:·Sat,·23·Jul·2011·07:28:50·GMT
Server:·Apache/2
Content-Location:·qa-http-and-lang.en.php
Vary:·negotiate,accept-language,Accept-Encoding
TCN:·choice
P3P:·policyref="http://www.w3.org/2001/05/P3P/p3p.xml"
Connection:·close
Transfer-Encoding:·chunked
Content-Type:·text/html; charset=utf-8
Content-Language:·en
But where is this file... and why is this character "·" used?
Why not use comma separated en, fr, de ?
Rant (after hours of researching):
If website programmers are advised not to use in-doc programming, it would be better if we were told exactly how to edit the HTTP header for any given page.
Therefore the question is simple?
Using CPanel, or Filezilla (and perhaps notepad++)... How do I modify the HTTP header for index.html to show that it contains English, French, German?
Note: I am currently using the bad code PLUS 'lang tags' eg:
<li lang="fr">
I'm trying to do what is right, but after looking on 'HTTP header help-sites', I never once found a statement re:
Exact file location
Filename and extension
Can anybody help solve this mystery?
If you didn't manage to find this, the HTTP Headers are what you are after as they describe the language you are expecting your target audience to use, and it can be multiple languages. HTTP Headers are set on your web server and apply to every page in your website.
If you are using Apache find the .htaccess file and add something along the lines of:
Header set Content-Language "en"
If you are using IIS then:
navigate to your website in the IIS GUI
double-click 'Http Response headers'
click 'Add...'
the name is Content-Language, the value is the language you want to use, for example use en for any kind of English, use commas to seperate multiple
Click OK
I got most of my info from here:
https://www.w3.org/International/questions/qa-html-language-declarations#metadata
Here is a list of the subtags you can use:
http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
thickguru supplied the .htaccess solution above, many thanks, his answer is here:
Language not declared Ideally
I have a number of services that require an X-Auth-Token header to be sent similar to the below:
X-Auth-Token: 2e5db4a3-c80f-4cfe-ad35-7e781928f7a2
I would like to be able to specify this in my API documentation following the API Blueprint standard. However, from what I can tell from the API Blueprint headers section definition, you can only specify literal values (e.g. Accept-Charset: utf-8) and not a schema for what the header should look like (e.g. something like X-Auth-Token (string)).
I get the impression that Traits might help with this problem but it's a little over my head at the moment. Can anyone tell me how to specify that all requests to a given action (or set of actions) require an X-Auth-Token header?
You are right about not being able to define a schema for headers. Unfortunately, API Blueprint doesn't support it yet.
Until something like that is supported, you can use the literal value for the header like the following:
+ Headers
X-Auth-Token: 2e5db4a3-c80f-4cfe-ad35-7e781928f7a2
API Blueprint also does not support any Traits currently. I am afraid you might have been confused by reading other feature requests.
I remember some blog saying that response header Content-Disposition may cause security threats and the user's privacy is vulnerable. I also remember it stating that the header is not part of the HTTP Specs but I just can not find the blog or any proper article that why it is said so?
Please provide a simple code example to demo the same.
Content-Disposition is an HTTP header field; consult the IANA header field registry for the RFC definining it (and, hint: that RFC contains a section called "Security Considerations").