CodeIgniter Forums
Problem in load css - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Problem in load css (/showthread.php?tid=71934)

Pages: 1 2


Problem in load css - omid_student - 10-13-2018

Hi
When i load page,sometime website cannot load completely (css and other)
After reload page,it is OK
Why?
I attach picture here
Correct page is :
   

And when my page is not complete loading
   


RE: Problem in load css - Piotr - 10-13-2018

Go to browser console (F12 on firefox) then goto tab network and look what is returned near your css file. Which http code etc


RE: Problem in load css - omid_student - 10-13-2018

(10-13-2018, 09:21 AM)Piotr Wrote: Go to browser console (F12 on firefox) then goto tab network and look what is returned near your css file. Which http code etc
But this problem occur sometimes


RE: Problem in load css - MisterGeorgeX - 10-13-2018

Can you see your code?


RE: Problem in load css - php_rocs - 10-14-2018

@omid_student,

How are you calling your css / other files (relative or absolute)?


RE: Problem in load css - omid_student - 10-15-2018

(10-13-2018, 10:37 AM)MisterGeorgeX Wrote: Can you see your code?
Yes i see
I think Apache cannot complete request


RE: Problem in load css - omid_student - 10-15-2018

(10-14-2018, 12:20 PM)php_rocs Wrote: @omid_student,

How are you calling your css / other files (relative or absolute)?

Yes i am calling css correctly
When page dont loading complete,i reload page and page is loading completely


RE: Problem in load css - dave friend - 10-15-2018

Is this happening right after you make changes to the CSS files? If so, it might be due to browser caching and not really related to the site's code or apache issues. The fact that a second page load corrects the problem tends to indicate that it what's happening.


RE: Problem in load css - InsiteFX - 10-15-2018

One good thing to add to your head section is this:

Code:
<base href="<?php echo base_url();?>">



RE: Problem in load css - omid_student - 10-15-2018

(10-15-2018, 08:20 AM)InsiteFX Wrote: One good thing to add to your head section is this:

Code:
<base href="<?php echo base_url();?>">

I used <base href="<?=base_url()?>">