11

Is there a Javascript or jQuery method to minimize the current browser window?

1
  • 9
    That would be pretty scary! Commented Mar 2, 2009 at 10:00

4 Answers 4

17

There is no way to minimize the browser window within javascript.

There are ways to change the size of the window, but no true minimization (nice word)

Sign up to request clarification or add additional context in comments.

1 Comment

Really nice word, cheers to that!
5

No, there isn't. However, depending on what you're doing and which browsers you're targeting, you could play around with the blur and focus events of the window to achieve similar effect.

1 Comment

can you describe your method?
3

If you use an extension, then you can minimize by chrome.windows.update(window.id, { state: 'minimized' })

Comments

-9

I hope this is what you are looking for:

<SCRIPT LANGUAGE="JavaScript">

function Minimize()
{
window.innerWidth = 100;
window.innerHeight = 100;
window.screenX = screen.width;
window.screenY = screen.height;
alwaysLowered = true;
}

function Maximize()
{
window.innerWidth = screen.width;
window.innerHeight = screen.height;
window.screenX = 0;
window.screenY = 0;
alwaysLowered = false;
}
</SCRIPT>

<A HREF="javascript:onClick=Minimize()">Minimize</A>
<A HREF="javascript:onClick=Maximize()">Maximize</A> 

3 Comments

When you state reference code, please consider adding the reference instead of appropriating the intellectual rights to yourself. This answer's code is literally taken from a nr.1 Google Search on "js to minimize windows", at htmlgoodies.com/beyond/javascript/article.php/3471151/…
I'll plagiarize yet another section of the same page: "This is an effect I have been using for a short while on some other sites I've worked on, and I thought it might make a nice tutorial. I'm really sorry to say that at the time of this tutorial (7/28/00 - Kathie Lee's last day with Regis) it only works on Netscape Navigator 4.0 and above." Netscape Navigator 4.0 is not a good target browser for your code. This is a deprecated 13 year old "solution".
This doesn't even work in all the browsers. Very poor answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.