where and how to store js, CSS, images files |
[eluser]mahe11[/eluser]
Hi all, I m new in framework. Plz any one help me where and how to store js(javascript), CSS, images files. So i will my site much better. Regards Mahesh
[eluser]Madmartigan1[/eluser]
This is my setup: application - CI application files system - CI system files public - css - js - images - etc. uploads (only writable directory) index.php .htaccess robots.txt ![]()
[eluser]Mischievous[/eluser]
Almost the same as Madmartigan1... little different I like having my themes or templates in a root directory so you can allow direct access to your css/images for your site without giving up system directories etc. Also, use media directory for anything not related to templates but used on the site and have a cron directory for any scripts that need to run by themselves which i have a custom index.php that runs codeigniter without having access it via the web. -application - CI application files -system - CI system files -crons -themes - css -images - js -cache (only writable directory) -media - images - swf - etc. index.php .htaccess robots.txt
[eluser]Ki[/eluser]
Ideally, css and js should be stored on a completely separate CMS in order to avoid overhead. Lots of top tier sites store them on a different domain altogether. If you want to know how to dynamically load js for each page to speed up your site, check this out: http://www.key2market.com/2010/10/managi...deigniter/
[eluser]WanWizard[/eluser]
The main reason for using a different domain, is that no cookies or other HTTP headers will be send with each request, speeding up the process of loading your images.
|
Welcome Guest, Not a member yet? Register Sign In |