Let all your controllers extend this MY_Controller.
If you want to load a certain page with the default header and footer, just use $this->render_page('viewfile-name');
All the data that you want to pass to the view, can be added to the $this->data array, like:

I forgot to mention that the method is in MY_Controller.
I didn't try yet those ways you provide guys but would it accomplish what I want to achieve.

Like this, assumed I have a dashboard and when the index page is loaded all resources like jquery would also be loaded. Then when navigating to links inside the dashboard only the content wrapper that will change and it will not load the resources again.

Quote:assumed I have a dashboard and when the index page is loaded all resources like jquery would also be loaded. Then when navigating to links inside the dashboard only the content wrapper that will change and it will not load the resources again.

Nice thought, but it would mean that all content within the dashboard is shown via one URL. Once you change the URL (e.g. because you switch to another method inside the controller), a new page is loaded.
If you just want to change some elements on your page without refreshing the whole page, you will need AJAX.