Is it possible to open a new browsing window in private browsing mode using AS3 for flash? I know by calling:
navigateToURL(new URLRequest("adobe.com", "_blank"));
but is there a way to do this so that the new window/tab that opens is using private mode?
You can't force a user to open the browser in private browsing mode.
This isn't just true for AS3/Flash, it's true across the board. Unless you're using code native to the browser (which you couldn't execute from AS3/JS), you can not do it.
This is, in part, because not all browser have private mode. Even those that do, have implemented it differently.
See the following questions:
New Chrome Incognito Window via HTML/JS
How to open new incognito window with Javascript? (Google Chrome)
It would appear it simply is not possible in Chrome without being done through an extension with a certain permission. Flash is quite a bit more locked down than JS, so it is very likely impossible. A quick Google search for "flash open incognito" shows no relevant results, too, so that also makes me believe what you want isn't possible. I would assume it is similar for other browsers as well, though I did not search to be sure.
Related
If I visit a site, I want to close the Chrome Web Browser. Is it possible to write such a program?
Under normal operation, this should not be possible. However, there have been cases where browsers have had well known bugs that could be exploited. To be clear though, I'm referring to crashing the browser. There is no supported API or method of asking the browser to close.
For instance, a simple line of CSS could crash Internet Explorer 6. Something like this on Chrome would probably not work anyways, since Chrome runs each tab in its own process.
There is a way to close a browser window (tab) via script if your script opened the window, simply by calling window.close() (where window is the child window). Please see https://developer.mozilla.org/en-US/docs/Web/API/Window/close for more information.
When attempting to use Chrome in application mode as a host for an HTML5 application, there seem to be some severe limitations.
For example, if the user hits CTRL+T it will open up a new Chrome browser window, and allow them to start typing in the address bar. Ditto for CTRL+W. This is disconcerting, as it directly contradicts the intention of application mode; to make a web page feel like a normal application (that's not in Chrome).
Is there some mechanism through which one may disable this functionality?
Alternatively, are there forks of the Chrome project which are better suited to wrapping-up HTML5 applications?
Chrome Kiosk mode seems a little more appropriate but still suffers the issue of allowing new tabs (although possibly handles them a little better than app mode).
Enable kiosk mode in a shortcut with shortcut format
"...\chrome.exe" --kiosk
Otherwise it may just be a case of manually disabling certain Ctrl + key events.
Eg disabling the save event Ctrl+S (in jQuery without hotkeys - I'm sure there are other methods for whatever your preferred JS lib is)
$(document).bind('keydown', function(e) {
if(e.ctrlKey && (e.which == 83)) {
e.preventDefault();
return false;
}
});
When Chrome stops WebGL and gives you the following error (in a yellow banner on top of the screen): "Rats! WebGL hit a snag...", and reloading does not work (WebGL is still not re-enabled), is it possible to re-enable WebGL without restarting Chrome?
Context:
Chrome disables WebGL probably because it requires too many resources: I ask it to display 400,000 billboards on Cesium, for those who know what this is.
I know how I could reduce the resources my app asks for, but actually I am exploring its limits for testing purposes. So I am going to make Chrome disable WebGL a lot of times, and I do not want to restart it everytime it disables WebGL.
My configuration:
Chrome 35.0.1916.114 m
Windows 7 Pro 64 bit.
Solutions explored:
I already tried to open a new Chrome window, it does not work. For the moment all I can do is close all Chrome windows and restart it.
I already tried to put --ignore-gpu-blacklist in the Chrome shortcut (even if I understood this is for Windows XP, right?).
Hope I was clear enough.
Thank you for your help.
I was having the same problem and I just found a solution. It sounds like this didn't work back when this question was posted but, it works now!
Refreshing the page doesn't work. If you clicked a link from a different tab to open the tab the crashed, clicking that link again doesn't work. You have to open a new tab and paste in the URL of the page that you want to reload.
I'm guessing this is due to chrome threading... by opening a brand new tab, you create a new thread instead of using the existing one.
In your application you should properly handle webglcontextlost and webglcontextrestored events. In particular, you should prevent default event action in webglcontextlost handler thus telling the browser that you can restore proper functioning of your app when webglcontextrestored will be fired.
Googling this question turns up questions about people wanting to know if someone else in their household is using incognito mode when they browse the web, that is not what I'm interested in. Using cookies, I cannot distinguish between a first time visitor and an incognito or private mode visitor. I would like to distinguish between those two cases.
It is sometimes possible to detect private-mode in client browsers, though the methods used are not 100% reliable depending on the browser version and release.
Most of the methods used for this are based on Javascript code, and some other make use of HTML5 or CSS features (e.g. LocalStorage on Safari).
See the following answers for more details:
Detecting if a browser is using Private Browsing mode
Can web sites detect whether you are using private browsing mode
I need to be able to monitor navigation events (such as page loads or switching between active tabs) in browsers running on a Windows PC. So far, I can get this to work in IE and Firefox by loading a DLL into all running apps via a call to SetWindowsHookEx, then asking for either the IHTMLDocument2 (in IE) or nsIWebProgress (in Firefox) interface from the application. I can use the appropriate interface to request a callback from the application when an event of interest happens.
Is there a way to do this in Chrome? I have read a little about Chrome extensions, but I have not found any documentation on an API exposed by Chrome that is analogous to COM in IE or XPCOM in Firefox. Will a similar approach work or will I need to do something completely different? (I am working in C++.)
I would appreciate it if someone could at least point me in the right direction.
Thanks.
With Chrome extensions API you can register some events handlers for changing state of tab like when document state is changed (loading or loaded), when new tab is added/removed from window or when user switch between tabs.
More about tabs events You find on http://code.google.com/chrome/extensions/tabs.html#event-onActiveChanged