Codeigniter中用于不同Controller的不同JavaScript,JQuery或CSS

I am working on Codeigniter v3 project, we are building an application for an organization and its a quite big in size. So that I want to load custom/different JQuery and CSS files/code for every Controller and its view in Codeigniter, so that I can minimize the load of every page.

Please help me how to achieve this in Codeigniter v3.

It depends on your requirement and project structure.

Normally you can implement it in different ways

  1. Pass your different css/js file paths to associate view pages from the controller.
  2. Put different static js/css file paths directly inside your each view pages.
  3. You can create different Constants to define each css/js paths and can use in different views or pass those constants from controller to view.