Added by

Most likely it's about the Nginx configuration settings.

Original

Google pointed out my mistakes to me:

Use browser cache

If you specify the date or expiration date of static resources in the HTTP headers, the browser will download the resources already received from the local disk and not from the Internet.

Well, below the list. I will give it a part:

https://mc.yandex.ru/metrika/watch.js (60 минут) https://www.google-analytics.com/analytics.js (2 часа) http://site.com/…15877ddfa223e8a8a7533474f07.woff?v=4.7.0 (4 часа) http://site.com/…98cf4de8c1914ef7e8afc9a9abefe3693e57.jpg (4 часа) http://site.com/…62479c3d86a76ab7143d4dc639a6f5f67daa.jpg (4 часа) # Далее также перечислены .js и .css файлы с такой же структурой, # как и .jpg файлы выше в списке. 

enter image description here

But I generally thought that having a hash in the file name is just for the browser cache. Older versions of Rails used this view, yes:

 /stylesheets/global.css?1309495796 

But in new versions hash is used:

 global-908e25f4bf641868d8683022a5b62f54.css 

Well, it is written in the official documentation .

So what is it? What is my cant?

  • You'd be surprised, but Ruby on Rails has nothing to do with it. You need to configure a web server that distributes assets. Describe the details in this direction. - D-side
  • @ D-side can hint at the configuration (name) in the Nginx config (if I understood correctly what this is about)? Because I did something there on this topic, relying on the manuals from the site DO. - Colibri
  • V-from, that is, the nginx tag and the config in question are already needed. And the setting is called, it seems, expires . - D-side
  • Somewhere indicated 4 hours. We must find and replace the year (or 10 years) - Alexey Ten

0