user31898: I know that mining bitcoins via JavaScript is just pointless at this point in time, but is there any other altcoin that is worthwhile mining via a GPU/CPU via a JavaScript embedded into a web page?
Our website gets over 2 million unique visitors per day, with an average time of 5 minutes on site. 
Is there anything we could do to get them to mine something in order to get even $0.005 per visitor? or is it basically impossible? 

user30591: I think there are some great answers here, hopefully this isn't too repetitive...
First, the metric you gave (2m daily unique visitors) is a great number, but it's not the right one when you're talking about proof-of-work mining. In that world, the relevant metric is more like the number of CPU-seconds you have available to you (a "cycles per second" number).
To be more specific, your number doesn't really cover what's going on, because one unique user could leave their browser open all day (and therefore hashing for you all day), while another could close it in one second. Those two users would do vastly different amounts of hashing work, so you need an idea of the number of concurrent tabs open.
Using the awesome numbers from @Nayuki's answer, we can get a bit further:
(Note, I'm using the "Hz" unit here with one "hash" being one cycle.)

each open tab to your site could generate about 30 MHz (per the calculations above)
the BTC network is doing 800 PHz (800,000,000,000 Mhz)
A big mining pool (ghash.io) is doing about 7.5 PHz (7,500,000,000 MHz)
7.5 THz / 30 MHz per concurrent open tab = 250,000,000 concurrent open tabs

This is... actually not all that ridiculous of a number. It basically means that to hash as much as a large mining pool, you need all of the US on your site all day every day. This is really tough for a single site, but a global ad-network serving ads that just do hashing could potentially do this, as I suspect there are at least 250m tabs open at any given time if you're looking at the whole world.
That said, you'd almost certainly earn more money per user relying on advertising, so I don't expect to see ad networks go this route anytime soon.

user31844: First off, without the visitor's consent it would be unethical. 
Besides that, no it is not impossible. In the past there were sites doing that getting a fee for the service and providing the profits to visitors.
Having said that it would provide way less than $0.005 per visitor. But with so many visitors it might still worth it.
Also this might be of help.

user23340: It is true that mining Bitcoins like this is impossible. (I can't speak for altcoins though.)
Let us run through a back-of-envelope calculation based on some facts and assumptions.

Network hash rate is 800 000 terahashes per second as of 2016-01-18 [source].
Remember that currently 25 BTC are rewarded every 10 minutes.
A modern consumer-grade CPU has 4 cores, and can calculate about 400 MB/s of SHA-256 per core in C. (More generous than JavaScript, but ignoring the upcoming Intel SHA Extensions instructions.)
One Bitcoin hash trial uses 2 blocks of the SHA-256 compression function (each block is 64 bytes), so this translates to 8 million hashes per second per core, and 30 million hashes per second per CPU.
One visitor donating 5 minutes of full-CPU time gives 9 gigahashes.
Multiplied by 2 million visitors per day gives 18 petahashes per day.
Meanwhile the rest of the Bitcoin network has produced 70 000 000 petahashes in a day and mined 3600 BTC.
The current price is 1 BTC = $400 USD. Your 18 PH out of 70 000 000 PH is 0.000026%, so this yields 0.0009 BTC reward, equaling $0.37 USD per day in total. But divided among everyone, this equals $0.0000002 per visitor.

With 2 million visitors a day though, why not optimize the ad revenue, user retention, conversion funnels, and other traditional online business techniques?

31898: <p>I know that mining bitcoins via JavaScript is just pointless at this point in time, but is there any other altcoin that is worthwhile mining via a GPU/CPU via a JavaScript embedded into a web page?</p>

<p>Our website gets over 2 million unique visitors per day, with an average time of 5 minutes on site. </p>

<p>Is there <em>anything</em> we could do to get them to mine <em>something</em> in order to get even $0.005 per visitor? or is it basically impossible? </p>
 30591: <p>I think there are some great answers here, hopefully this isn't too repetitive...</p>

<p>First, the metric you gave (2m daily unique visitors) is a great number, but it's not the right one when you're talking about proof-of-work mining. In that world, the relevant metric is more like the number of CPU-seconds you have available to you (a "cycles per second" number).</p>

<p>To be more specific, your number doesn't really cover what's going on, because one unique user could leave their browser open all day (and therefore hashing for you all day), while another could close it in one second. Those two users would do vastly different amounts of hashing work, so you need an idea of the number of concurrent tabs open.</p>

<p>Using the awesome numbers from @Nayuki's answer, we can get a bit further:</p>

<p>(Note, I'm using the "Hz" unit here with one "hash" being one cycle.)</p>

<ul>
<li>each open tab to your site could generate about 30 MHz (per the calculations above)</li>
<li>the BTC network is doing 800 PHz (800,000,000,000 Mhz)</li>
<li>A big mining pool (ghash.io) is doing about 7.5 PHz (7,500,000,000 MHz)</li>
<li>7.5 THz / 30 MHz per concurrent open tab = 250,000,000 concurrent open tabs</li>
</ul>

<p>This is... actually not all that ridiculous of a number. It basically means that to hash as much as a large mining pool, you need all of the US on your site all day every day. This is really tough for a single site, but a global ad-network serving ads that just do hashing could potentially do this, as I suspect there are at least 250m tabs open at any given time if you're looking at the whole world.</p>

<p>That said, you'd almost certainly earn more money per user relying on advertising, so I don't expect to see ad networks go this route anytime soon.</p>
 31844: <p>First off, without the visitor's consent it would be unethical. </p>

<p>Besides that, no it is not impossible. In the past there were sites doing that getting a fee for the service and providing the profits to visitors.</p>

<p>Having said that it would provide way less than $0.005 per visitor. But with so many visitors it might still worth it.</p>

<p>Also <a href="https://bitcoin.stackexchange.com/questions/10320/how-useful-is-a-javascript-miner?rq=1">this</a> might be of help.</p>
 23340: <p>It is true that mining Bitcoins like this is impossible. (I can't speak for altcoins though.)<br>
Let us run through a back-of-envelope calculation based on some facts and assumptions.</p>

<ol>
<li><p>Network hash rate is 800 000 terahashes per second as of 2016-01-18 <a href="http://bitcoincharts.com/bitcoin/" rel="noreferrer">[source]</a>.<br>
Remember that currently 25 BTC are rewarded every 10 minutes.</p></li>
<li><p>A modern consumer-grade CPU has 4 cores, and can calculate about 400 MB/s of SHA-256 per core in C. (More generous than JavaScript, but ignoring the upcoming <a href="https://software.intel.com/en-us/articles/intel-sha-extensions" rel="noreferrer">Intel SHA Extensions</a> instructions.)</p></li>
<li><p>One Bitcoin hash trial uses 2 blocks of the SHA-256 compression function (each block is 64 bytes), so this translates to 8 million hashes per second per core, and 30 million hashes per second per CPU.</p></li>
<li><p>One visitor donating 5 minutes of full-CPU time gives 9 gigahashes.<br>
Multiplied by 2 million visitors per day gives 18 petahashes per day.</p></li>
<li><p>Meanwhile the rest of the Bitcoin network has produced 70 000 000 petahashes in a day and mined 3600 BTC.</p></li>
<li><p>The current price is 1 BTC = $400 USD. Your 18 PH out of 70 000 000 PH is 0.000026%, so this yields 0.0009 BTC reward, equaling $0.37 USD per day in total. But divided among everyone, this equals $0.0000002 per visitor.</p></li>
</ol>

<p>With 2 million visitors a day though, why not optimize the ad revenue, user retention, conversion funnels, and other traditional online business techniques?</p>
