![]() |
Asset Manager Library Update - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Asset Manager Library Update (/showthread.php?tid=64486) |
Asset Manager Library Update - BrendanRehman - 02-24-2016 Hi Guys, Just wanted to post an update to my asset manager library... cleaned up some code and added to the Readme file. https://github.com/IgnitedCoder/ignitedassets PS I'll be adding minify and combine options soon. Enjoy, Brendan RE: Asset Manager Library Update - skunkbad - 02-24-2016 I just want to share something with you, because it helps with caching, and making sure new versions of files are used when necessary. I use the following code to add a version to my css files: PHP Code: // Add any additional stylesheets I have a different one for js files, but the concept is the same. RE: Asset Manager Library Update - Diederik - 02-24-2016 I have a small addition to @skunkbad. I use a different file naming method for even better caching on the client side. I use the format "styles.1456341663.css" instead of "styles.css?v=1456341663". I do this because appending a parameter to a url result in a miss on a caching proxy a visitor might use. For more details about this subject: http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/ You can use .htaccess to reroute styles.1456341663.css back to styles.css so you can just override the same styles.css file like you are doing now and benefit from more caching capabilities on the client side (and still have the ability to burst the cache). Code: <IfModule mod_rewrite.c> RE: Asset Manager Library Update - BrendanRehman - 02-24-2016 Awesome and valuable changes. Guys please feel free to submit a PR for these changes... I'll add em immediately. We can turn this into something very useful for the CI community. Thanks, Brendan |