We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questionIs there a jquery way or plugin to detect the visitor's browser window size when they first come to t开发者_StackOverflow中文版he page and auto stretch the browser for them if it's too small?
It's a pretty common thing that I've seen done a few times, so I'm guessing someone here will know about it.
Don't do this, most browsers prevent this from happening, for good reason.
Would you like me to come stretch your email client across both monitors so you can't work? Why should a web browser be treated any differently? Some decisions are for the user this is definitely one of them.
The users has expectations browsing the web, doing things like this breaks those expectations. If I had 20 tabs open in chrome (and often do, on several windows), I don't want your site to resize the other 19. It does however make me want to hunt you down with a salad fork and stab it in your eye.
Try using the window.resizeto(width, height)
function
精彩评论