M
M
Mikha Pankratov2017-03-17 16:55:03
Yii
Mikha Pankratov, 2017-03-17 16:55:03

How to clear browser cache using Yii2?

Hello everyone, I'm trying to clear the cache
Yii::$app->cache->flush()
but it doesn't help - who knows exactly how to clear the browser using yii2?
thanks for the advice

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Astrohas, 2017-03-17
@Astrohas

stackoverflow.com/questions/24819220/yii2-assets-c...
or like this
www.yiiframework.com/wiki/311/assetmanager-clearin...

M
Maxim Timofeev, 2017-03-17
@webinar

Yii::$app->cache->flush()- has nothing to do with the browser. as it is executed on the server and cleans the cache there.

кто знает как именно браузерный очистить средствами yii2
directly in any way, again, since yii is executed on the server. But indirectly it is possible. However, yii has nothing to do with it. What exactly is the problem. Because there are different paths. For example, a link like /css/my.css?v=3 will update the my.css file.
You can also send headers, here in detail:
What does it mean Use the browser cache?
vasilenko.info/pagespeed-cache

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question