tags:

views:

99

answers:

2

hello, is there a javascript script that auto fullscreen mode the browser? example if you visit my site, the browser will auto fullscreen upon load..

+15  A: 

Please, don't do this. You shouldn't resize the browser, that's the user's choice to make.

If I have my browser at a certain size, and your site is one of 20 tabs, why should the other 20 be resized?

If you're using window.open() to open a new window and want to specify a size, that's fine, but don't resize the browser. Most browsers actively block this, for a reason.

Nick Craver
ahhh.. ok.. thanks for your advise sir.. :)
vrynxzent
@vrynxzent - Welcome :) There are *many* alternatives out there, differently sized layouts, static/dynamic layouts, fluid width, etc...see which works, resizing isn't the only way to tackle the problem :)
Nick Craver
@vrynxzent – …and I even discourage the use of `window.open`; I really hate popups and if you just throw a large window, occupying the entire screen, in my face without obvious reason, when visiting your site, I'm very inclined to close it as soon as possible and *never* come back. ;-)
Marcel Korpel
+1  A: 

I looked into this once and like Nick said browsers do not allow you to control setting fullscreen for security reasons e.g. think malicious website recreating the toolbar to trick users. The closest you can get to it is explaining to the user in a ribbon or popup the first time they visit, how to get to fullscreen and letting them make the decision. Then the trick is check for the keypress on f11 assuming that's how you had the user do it.

The only place I wish it was allowed for the site to go fullscreen is webapps.

qw3n
good point about webapp, I am currently have this issue, but it seems that F11 button is the only solution.
Mike