Suppose site B has set itself a JS code for a site that performs certain functions in php and issues a specific code, that is, the js file being imported is not static. If they do site B, will site A also fall? If this is so, then the solution to this problem, I understand you need to do caching data js files?
2 answers
Suppose site B has set itself a JS code for a site that performs certain functions in php
How can this be done? JS file must perform only JS code. The PHP code executes the php interpreter, processing the code in <?php ?>
Or other instructions.
If they do site B, will site A also fall?
DDOS-attack is based on sending a huge stream of packets to the server on which the site is hosted. Therefore, site A will not fall down, because pages of site B will not even open / execute parse when attacking => your JS code with a request to site A will not be executed either.
- oneWell, not really ... DDoSit can be a specific service, which, knowing our web application writers, can already provide even very efficiently. What is the essence of the question - hardly. Problems with site A will only happen if he is very, very unlucky (another site somehow falls into the list of resources that are filled up). - SilverIce
If they do site B, will site A also fall?
No DDOS attack consists not in loading a web page with all auxiliary files linked from it from third sites, but in bombing a web server with B requests, often without even waiting for an answer.
need to do caching data js files
It is necessary . So that when repeated requests with the same parameters that determine the content of this JS, the ready-made JS is generated, not re-generated using php, but cached in memory or on disk.