![]() |
Views not reflecting code, html or css changes - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Views not reflecting code, html or css changes (/showthread.php?tid=82733) |
Views not reflecting code, html or css changes - cheesecakenl - 08-16-2022 Whenever I change my view code, html or css it takes really long (~60 sec.) to reflect in my local browser. However if I have for example a list view and add a database item it show right away. It feels like a caching problem but I have tried several things already after googling this issue. Specs:
Code: header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
Code: public $ttl = 3;
RE: Views not reflecting code, html or css changes - badger - 08-17-2022 to prevent cache problem, maybe give the css file a different name each time you change it eg mystyle_01.css and increment the _01 accordingly. Then either manually update it in your html view or run a small function in the controller to pick the css file with the highest number and pass this to the view. RE: Views not reflecting code, html or css changes - prasedenica - 08-18-2022 Launch Chrome on your machine. 1. Click More in the upper right corner. 2. Select More tools. Clear your browsing history.duck life 3. Select a time range at the top. Select All time to erase everything. 4. Check the boxes next to "Cookies and other site data" and "Cached pictures and files." 5. Select Clear data. |