• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Asset Loader Library

#6
(03-16-2019, 04:43 PM)includebeer Wrote: I don't understand what problem this library tries to solve. How hard is it to load assets? Why would I want to depend on an external library and learn how to use it for a task as simple as loading assets?

Valid question. A lot of people put all their assets together and minify them so they can load them in a single call on every page, in which case this library probably isn't applicable. The problems I originally was solving in my first version of this:

1. The need to load specific styles and scripts for certain pages, not others
2. The need to use a single header/footer template that could somehow have assets "injected" into them
3. The need for cache resets on assets updates (using timestamped parameter suffixes)

After numerous iterations of the original CI3 library I settled on the directory structure version because it made it easier for me to control which files were loaded while not trying to "track" them anywhere else (though the $routes variable offers this additional functionality).
Thanks for the question! Would you share how you handle assets?
Reply


Messages In This Thread
Asset Loader Library - by MGatner - 03-14-2019, 08:28 AM
RE: Asset Loader Library - by MGatner - 03-15-2019, 05:45 PM
RE: Asset Loader Library - by dave friend - 03-17-2019, 10:10 AM
RE: Asset Loader Library - by PaulD - 03-16-2019, 09:29 AM
RE: Asset Loader Library - by includebeer - 03-16-2019, 04:43 PM
RE: Asset Loader Library - by MGatner - 03-16-2019, 04:59 PM
RE: Asset Loader Library - by MGatner - 03-16-2019, 04:52 PM
RE: Asset Loader Library - by includebeer - 03-16-2019, 05:13 PM
RE: Asset Loader Library - by MGatner - 03-16-2019, 05:57 PM
RE: Asset Loader Library - by MGatner - 03-17-2019, 04:55 PM
RE: Asset Loader Library - by MGatner - 03-18-2019, 02:21 PM
RE: Asset Loader Library - by MGatner - 03-19-2019, 09:31 AM
RE: Asset Loader Library - by MGatner - 03-25-2019, 02:10 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.