Views not reflecting code, html or css changes |
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;
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.
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. |
Welcome Guest, Not a member yet? Register Sign In |