Php http headers

Interestingly, a couple of things.

HTTP headers cache everything on the page. And if I have some javascript files, they will cache them also for subsequent pages, or it is more complicated than that. Example. If I cache all javascript files on page1.php, the files will be cached on page2.php or cache files for page1.php only for page1.php.

Another question:

Do I have to spoof HTTP headers and just use APC, and if so, how difficult is it, or, in fact, can I use both (ask cuz yslow says to use http headers). Thank you for any information that I read, but did not answer this question in the text.

+3
source share
2

- , .js. .js . , .js, . <script src="code.js"></script>.

, , .js. , , JavaScript, HTML, PHP-, :

<script type="text/javascript">
  alert("Hello world!");
</script>

... .php. PHP-, , HTTP- PHP-, Cache-Control If-Modified-Since ETag .

PHP , , , , cookie .. - , . HTTP-, ( !). , , , Apache IIS HTTP-, , HTTP-, .

+4

, . 3 4 .

  • - , JS CSS . , , - , , . - , . (: , , , mime.types , .)

  • - , RAM, , . .

  • APC - APC , RAM . , , .

  • APC - PHP- "", PHP . "" , APC "PHP-" PHP . - .

, TMI.

+1

Source: https://habr.com/ru/post/1711050/


All Articles