I am making a website. On a button click, the JS function named HeavyTask is called. It has an ajax call to the Action Method that will perform a CPU Heavy task on the server. The button looks like this
<input type="Submit" value="Start" onclick="HeavyTask()" />
But I am worried that someone may press F12, right click any element-> Edit as HTML and inject script like this
setInterval(HeavyTask, 100);
And cause the server CPU to waste all its processing power and cause website to lag. I tried to do this from chrome. I was able to change HTML Elements, but not able to run this Script. But there may be some browsers/other techniques that will allow. Should I worry about it, or not. If yes, how can I fix this so that user can't call the function for second time until the first call returns. My backend technology is ASP.NET. Thanks