S
S
stanlee2015-08-19 02:26:00
PHP
stanlee, 2015-08-19 02:26:00

What is the best way to organize a cache flush for static files?

When laying out, css and js files are collected into single compressed files.
Without specifying a get parameter or changing the file name, browsers will not immediately flush the cache. The
question is how best to organize variable substitution without unnecessary actions?
Do not change it at every commit)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Taratin, 2015-08-19
@Taraflex

https://www.google.ru/webhp?sourceid=chrome-instan...

R
RubaXa, 2015-08-19
@RubaXa

It's best to calculate the checksum for the file and rename it, this will give 100% cache invalidation, but is also saved from false resets.

V
Vladimir Abiduev, 2015-08-19
@gunlinux

I collect gulp statics and it pulls out the version from packages.json and pushes it into the html template.
grunt has grunt-fingerprint

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question