How can I cache specific html / css files?

How can I cache certain files in html? I tried


meta http-equiv="cache-control" content="private" max-age="604800"

but when I click "revision" using the Chrome Chrome validation item giving it to me

Leverage browser caching (4)
The following resources are missing a cache expiration. Resources that do not specify an expiration may not be cached by browsers:
some.css
some.js
The following resources are explicitly non-cacheable. Consider making them cacheable if possible:
some.html
some-hosted.html

how can i cache em?

+3
source share
2 answers

Your syntax is invalid.

<meta http-equiv="cache-control" content="max-age=604800;private" />

, CSS/JS - , HTML. HTTP- ( - , PHP,.NET, Coldfusion ..).

+4

- - , HTTP-.

+1

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


All Articles