D
D
dfhusfhgsuo32016-07-20 00:50:33
PHP
dfhusfhgsuo3, 2016-07-20 00:50:33

How to enable caching on a regular html page?

How to enable caching of images, scripts, styles on a site that is uploaded to the hosting and consists of 1 index.html page + your styles, scripts. How can I enable caching for this page?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Sol, 2016-07-20
@NN-webmaster

Option 1
Enable caching on the server using the .htaccess file (if the server is Apache). Or, using a similar specialized file for nginx.
Use meta tags

<meta http-equiv="Cache-Control"...
<!-- и -->
<meta http-equiv="expires"...

It is said that this will not work in all cases.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question