<p>Typically when you browse to a website that is mining with your computer, you will notice that CPU usage increases dramatically. However, if the mining code is tuned to prevent noticeable CPU usage increases, it will be basically impossible to detect if a website is mining through your browser. The only way to know would be to examine each and every website's source code yourself.</p>

<p>However to avoid this problem, you can just prevent JavaScript from running at all. Using a plugin like <a href="https://noscript.net/" rel="nofollow noreferrer">NoScript</a>, you can prevent JavaScript from executing when you visit any website which will thus prevent JavaScript miners from using your computer to mine cryptocurrencies. You can then enable JavaScript for specific websites and enable certain scripts for each website so that you know are not mining with your computer while still making websites that use JavaScript usable.</p>

CC BY-SA 4.0
2018-06-01T02:13:50.930Z
Many web sites have for years made CPU fans hum due to advertisements that are for some reason more socially acceptable.  Adds are really more of endemic problem today than mining code buggyware functioning in a browser.
skaht
CC BY-SA 4.0
2018-06-01T10:51:49.683Z
I think for ads there are working browser plugins available to identify and remove from the page your are browsing.
mdeora
CC BY-SA 4.0
2018-06-01T10:53:53.450Z
@AndrewChow disabling JS seems near to impossible as nearly every website requires it. Was looking something to analyse javascript code and see if there is anything relating to do some sort of repetative task or cpu intensive tasks.
mdeora
CC BY-SA 4.0
2019-08-10T20:30:45.523Z
One can prevent javascript from running in the browser from urls that are known to do bad things. As mentioned, usually these are advertisers and the like. Luckily modern browsers sandbox urls to allowed domains, but if a site owner has added a script to their site, it's as good as part of the site. However, if it talks to a different site, most browsers other than Chrome block it by default. With Chrome one has to install an extension such as Privacy Badger by eff.org or uBlock Origin by Raymond Hill.
tim-phillips
CC BY-SA 4.0
2018-05-31T22:12:38.730Z
2018-05-31T22:12:38.730Z
Ava Chow
<p>Until recently I have heard that lot of webpages are infected with the javascript which uses your computer's power to mine bitcoins.</p>

<p>Whats the correct method to identify if the website i am browsing is infected by this?</p>

<client><mining-hardware>
how to know if a webpage has mining code?
mdeora
# how to know if a webpage has mining code?

(Asked by: username_0 on 2018-05-31)

Until recently I have heard that lot of webpages are infected with the javascript which uses your computer's power to mine bitcoins.

Whats the correct method to identify if the website i am browsing is infected by this?

**Tags:** client, mining-hardware


---

## 1 answers

### Answer by username_1 on 2018-05-31. Score: 1

Typically when you browse to a website that is mining with your computer, you will notice that CPU usage increases dramatically. However, if the mining code is tuned to prevent noticeable CPU usage increases, it will be basically impossible to detect if a website is mining through your browser. The only way to know would be to examine each and every website's source code yourself.

However to avoid this problem, you can just prevent JavaScript from running at all. Using a plugin like [NoScript](https://noscript.net/), you can prevent JavaScript from executing when you visit any website which will thus prevent JavaScript miners from using your computer to mine cryptocurrencies. You can then enable JavaScript for specific websites and enable certain scripts for each website so that you know are not mining with your computer while still making websites that use JavaScript usable.

> **Comments:**
> **username_2**: Many web sites have for years made CPU fans hum due to advertisements that are for some reason more socially acceptable.  Adds are really more of endemic problem today than mining code buggyware functioning in a browser.  
> **username_0**: I think for ads there are working browser plugins available to identify and remove from the page your are browsing.  
> **username_0**: @AndrewChow disabling JS seems near to impossible as nearly every website requires it. Was looking something to analyse javascript code and see if there is anything relating to do some sort of repetative task or cpu intensive tasks.  
> **username_3**: One can prevent javascript from running in the browser from urls that are known to do bad things. As mentioned, usually these are advertisers and the like. Luckily modern browsers sandbox urls to allowed domains, but if a site owner has added a script to their site, it's as good as part of the site. However, if it talks to a different site, most browsers other than Chrome block it by default. With Chrome one has to install an extension such as Privacy Badger by eff.org or uBlock Origin by Raymond Hill.  

---

