Perhaps the question is rather stupid, but I did not find a direct answer in the articles.
As we know, one css file with all styles is connected to the site (ideally).
However, there is such a situation (in a vacuum):
Suppose there are two sites on the same domain (which is stupid). We go to the main, there are two links: site1 and site2. The structure is as follows:
/index.html - это наша главная /site1/index.html - сайт 1 /site1/style.css - стили сайта 1 /site2/index.html - сайт 2 /site2/index.css - стили сайта 2 Addresses are different, it is obvious. We constantly work only with site 1. Accordingly, its css styles are stored in the cache. And suddenly we visited the site 2.
What happens in the cache?
- Site styles 2 will replace site styles 1 (because the domain is one)?
- Styles site 2 will be next to the styles of site 1 (because the addresses are different)?
If situation 1, then how to be, if the sites are not 2, but much more, and if you shove everything into one css, then it will weigh very, very much (and we don’t need all the styles, if we use only site 1 )?
If situation 2, then it turns out that it is beneficial to connect those styles that are relevant to a particular page, because Each page has its own address. But we are trying to connect as few css-files as possible, does this mean that only situation 1 is possible?
Will the result change if you use CNC and a single entry point (as far as I understand the single entry point, the address is always the same, but the page is built depending on the $_GET variables)?
PS I hope that explained the question quite clearly. Thanks in advance for the answer (s).