How to hide refferer from a website [duplicate] - javascript

This question already has answers here:
Remove http referer
(10 answers)
Closed 6 years ago.
For example I have a website X and I don't want the other site Y, to know my url adress if someone goes to site Y through my website X. How do I do that?

There is noreferrer value for rel attribute:
https://html.spec.whatwg.org/multipage/semantics.html#link-type-noreferrer
https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types
Prevents the browser, when navigating to another page, to send this page name, or any other value, as referrer via the Referer: HTTP header.
(In Firefox, before Firefox 37, this worked only in links found in pages. Links clicked in the UI, like "Open in a new tab" via the contextual menu, ignored this).
Example:
example
There is also a library that tries to support noreferrer on older/non-supportive browsers:
https://github.com/knu/noreferrer

Related

Large mailto links do not open in Chrome [duplicate]

This question already has an answer here:
mailto not working with large body content
(1 answer)
Closed 2 years ago.
I have a javascript script where I dynamically change the href attribute and trigger the click event.
var href = 'mailto:custom#outlook.com?subject=TestSubject&body=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
var element = document.getElementById('mail-link');
element.setAttribute('href', href);
element.click();
However, the above script appears to do nothing in Google Chrome. On the other hand, it works perfectly fine on Mozilla Firefox where the result is that it opens the default mail client with the appropriate mail recipient, subject and body.
I have also noticed that if I change the href to a shorter value, then Google Chrome manages to open the mail client.
var href = 'mailto:custom#outlook.com?subject=TestSubject&body=aaaaaaaa';
Is it possible to have Google Chrome open large mailto links?
I'm pretty sure that body text is not intended to be the first field of the message. Its intended for short text messages, not long bodies that you're used to seeing like... long bodies of text.
Check this out.
Have a look at how to get around chrome mailto maxlength limit. A suggestion there was to simulate a mail client to omit the issue.

Is it possible to disable the function window.open in Javascript [duplicate]

This question already has answers here:
disallow window open in javascript
(2 answers)
Override window.open()
(1 answer)
Closed 4 years ago.
I want to get rid of the window.open function. Is it somehow possible to override or deactivate this function?
I fact a want a browser in which the function window.open is not implemented at all. And I want a browser which is not able to load any resource which comes from another host than that one typed into address bar. (I know that many pages would not work any more in that browser.) But I know I will not get.
Sometime I visit a page that uses window.open by onclick for advertisement. I’m not against advertisement, but against unwanted pop-ups.
I want to inject those pages with my own JS to disable open().

Can't open chrome://something with window.open on Chrome [duplicate]

This question already has answers here:
Link to chrome:// url from a webpage
(2 answers)
How to open a page with information about the browser?
(2 answers)
Closed 4 months ago.
Good evening everyone,
I would like to open a window with javascript code.
Usually window.open works fine but the link I provide is chrome://gpu and when I do that, Chrome redirects me to the about:blank page. It happens only with chrome:// links, everything else works fine.
I may understand it is some security issue and Chrome blocks these links to be opened. Do you know if there is a workaround or a setting to allow Javascript to open chrome:// in a new window ?
Thanks a lot,
Clems4ever

HTML <a> hyperlink target inPrivate / incognito window [duplicate]

This question already has answers here:
How can we open a link in private browsing mode
(2 answers)
Closed 8 years ago.
Is there a way, via Javascript or other code, to open a url in a private/incognito window from an HTML page? Ideally cross-browser or at the very least IE and Firefox.
The anticipated behaviour would be along the lines of
Link
The simplified reason for this is because admins want to be able to log in as users to preview various pages, but without logging themselves out. Whilst there are various other ways around this issue, this would be the simplest (assuming it is possible).
We can't force the visitor to view the page in an incognito/private window. Browsers provide no API that would make that possible outside of an extension.

Print Web Page without header and footer (by code) [duplicate]

This question already has answers here:
Disabling browser print options (headers, footers, margins) from page?
(9 answers)
Closed 8 years ago.
I want to print a web page from IE without the header and footer that IE generates by default (in the footer there is the URL). Important this should be done by JavaScript or VBScript code and NOT the print settings for your web browser
thank you in advance, best regards.
If you're talking about the header and footer generated by the browser (i.e. page numbers, URL, etc.), then you cannot do it. These elements are generated outside the scope of the web page - and you have no control over them. They are part of user's configuration of their system and can only be manipulated by the user.

Categories