N
N
Nikolai2020-05-01 19:26:24
HTML
Nikolai, 2020-05-01 19:26:24

How to set caching time for html site?

Hello. Set up caching according to this article. It seems to work (by the way, I don’t know how to check for sure): in the developer console, the files that I assigned to the cache have a status of 200, but the numbers are dimmed, and the size column says "served from memory cache resourse, size 1.7 kB ". Then I checked for PageSpeed, but the indicator remained the same as 82. Requires to set a rule for efficient use of the cache for virtual objects, below is a list of my files. Here I did not understand how to set the caching time, i.e. I do not know where and how to register Cache-Control. There is more documentation on the link, but I didn’t understand much in it. I am a beginner and self taught.

Please tell me where and how to register Cache-Control. Just the site is designed to be used in unstable Internet conditions. Maybe there are some other nuances? If yes, then the hint will help a lot.

PS server apache
PS2. Is it possible to cache entire directives? Those. folders? And if you somehow manage to register it in index. php site on joomla?
PS3. In index. html has js files (jQuery) loaded through third-party resources. How to cache them?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arseniy, 2020-05-03
@niknik_ykt

1. I recommend looking at the dates of publications.
2. Caching of static resources (including images) can be done by setting the caching time in the htaccess config (Apache server) or in the Nginx config.
3. Caching the response of the result of the backend (read data from the database) is another type of caching that is not downloaded to the user's device, but simply relieves the load on the RAM, server computing power. This view is completely dependent on the engine used.
So, first of all, you should deal with static caching, it really depends on who you have and how it gives it away. Now almost everywhere there is both Apache and nginx. And often the static is divorced on nginx.
And then take a look at the engine. Most likely there is a module for Joomla, or maybe it can do it out of the box, but I won’t say for sure, because I think it’s long dead.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question