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

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.

Related

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

How does github lets you navigate pages without refresh? [duplicate]

This question already has answers here:
How to change URL in browser without navigating away from page?
(2 answers)
Closed 9 years ago.
I've navigated a lot through the github website. I've observed that whenever I click on a link, the page does not refresh and even the URL in the browser is changed. Moreover, those links are added in the history!
Well, I know that AJAX is a way to go and I know a lot of JavaScript(semi-intermediate level coder) but you can't change the URL with Ajax. Neither can you make those URLs be visible in the history.
So, how the heck do they do it?
There's a lot of tools out there to make this process easy nowadays, check out HistoryJS and NavJS.
Microsoft released an example application harnessing these technologies a while ago named "Big Shelf", which seems to have been taken down unfortunately. Obviously that's only relevant if you're using .NET.

javascript to close firefox browser [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to close window in firefox using javascript?
i want to close the main Firefox browser window that a user is browsing my site to close automatically using JS.
i came to know that setting dom.allow_scripts_to_close_windows = true in C:\Program Files\Mozilla Firefox\greprefs\all.js will allow this. Please let me know if it is possible to ovrwirte this value using our Javascript.
By default, a browser will only let you close windows via script which were themselves originally opened via script.
It is not possible to modify that value via JS in your page, and should not be. Imagine the implications of allowing a page to modify user preferences...
No. Websites cannot change the user's preferences.
No, you cannot change a browser configuration via JavaScript.

Does Facebook Connect have a javascript API that doesn't open a new window? [duplicate]

This question already has answers here:
Facebook Connect Dialog Popup
(2 answers)
Closed 8 years ago.
I want it to have a popup dialog javascript box. Instead of a new window.
I've seen it before. How can I get it?
Thanks.
Unfortunately, Facebook prohibits using a javascript pop-up instead of a new window. Until early this year, they weren't doing anything to block it, so some sites were doing it that way.
Now they've started detecting when they're in an iframe and are putting up a black overlay that, when clicked, opens their login in a new window. At least their implementation still allows sites that are doing it the "wrong" way to work with no changes, but it's frustrating.
It's possible to work around this using their mechanisms for client authentication, but that involves your web site prompting for the user for their Facebook password which is a horrible idea for security and privacy reasons as well as an explicit break of Facebook TOS.

Categories