Search code examples
cross-platformcross-browserfullscreen

Is there a way to make a website go full screen (WITH user click)?


A client wants me to create a website that can go to fullscreen when the user clicks a "View in Fullscreen" button/link. The solution I've seen posted here and elsewhere:

window.open('www.example.com', 'title', 'type=fullWindow, fullscreen, scrollbars=yes'); 

seems to work spottily across browsers. Is there a better/more compatible solution? Maybe something involving Flash?

Thanks in advance. (And I know someone will suggest it, so please believe when I say that an alert box asking the user to press F11 has been suggested and shot down)


Solution

  • Users don't like it when websites decide for them how big the window should be, because it was usually used by bad advertisers trying to grab their attention. It was annoying enough that most browsers now disable window resizing. I'm not saying that you are being a bad citizen, but the browser has no way to differentiate between bad behavior and good behavior.