Performance - base_url()-Call |
[eluser]noro[/eluser]
Ok, not that exact title, but dont know what I should use instead. I am working at an homepage project and I have a question. At the moment my documents look like this: Code: <link rel="stylesheet" href="<?=base_url();?>css/temp.css" type="text/css" /> Is that the best way to call the CSS(JS,AJAX, etc.)-Files? Is there a difference between href="../css/temp.css" and href="<?=base_url();?>...."? Otherwise the base_url() method doesn't look that elegant. Thanx Noro
[eluser]umefarooq[/eluser]
here is solution for your problem use this library for you javascript and css files. http://ellislab.com/forums/viewthread/78931/
[eluser]noro[/eluser]
Thanks a lot. Provides also other great stuff. ^^ Is there somethig like this for image-files? Because writing <img src="<?=base_url()?>/img/" />, my Designer starts to hate me ^^
[eluser]umefarooq[/eluser]
just let me know where you are putting your img foler either in application folder or on the root of you project. then i can help you.
[eluser]noro[/eluser]
I put them in the root folder. Think, that describes it also:: Ci-RootFolder |----image |----js |----System-Folder |------------App-Folder |
Welcome Guest, Not a member yet? Register Sign In |