Do individual requests influence the speed of the site in general?

0

Good morning!

A client is on the site, it runs in the console a code like this:

setInterval(function(){
   console.log('Teste');
}, 1);

Does his code, running on his browser, in any way damage the speed of the website in general? Server or something, or will it only harm itself?

This setInterval was just an example, it could be anything else, a for that will leave an infinite loop for example.

    
asked by anonymous 28.06.2018 / 13:23

1 answer

1

This code in your example runs locally only on the client's browser, so it will not hurt the speed or performance of the application on the server or for other users. Even if it was a for , it will only reflect on the client.

Now if your code makes numerous calls to the server, requesting a page or a service, api, etc., there may reflect on performance on the server and for other users.

In general, Web servers have the tools to block many requests coming from the same IP for example (which could be an example of a attack DoS and DDoS ), but if it is not configured correctly, you can even topple the service.

    
28.06.2018 / 13:28