I have a following problem.
I'm coding in CakePHP and I'm a novice. I quite often need to change some images or css files on the website. And on the website I always see the old content unless I manually press "F5" on the keyboard. And I have to do it on every workplace that uses that website.
It is irritating especially because I don't know where I can find the solution for it. I removed tmp files and cookies. Nothing helps and I don't know how can I fix it.
Could you please help me?
For anything under \webroot, see the Asset.timestamp
setting in core.php:
/**
* Apply timestamps with the last modified time to static assets (js, css, images).
* Will append a querystring parameter containing the time the file was modified. This is
* useful for invalidating browser caches.
*
* Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable
* timestamping regardless of debug value.
*/
Configure::write('Asset.timestamp', true);
For this to work, you have to use the Cake helpers to create the assets (e.g. $this->Html->image()
, $this->Html->css()
, etc)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With