1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

@import is a good practice?

Discussion in 'Web Design, HTML And CSS Forums' started by johnny.dacu, Jul 26, 2010.

  1. johnny.dacu

    johnny.dacu New Member

    Joined:
    Jul 6, 2010
    Messages:
    88
    Likes Received:
    4
    Trophy Points:
    0
    I know that one technique is to include some css files on main one with @import.
    Isn't this a bad practice? Because with @import browser still makes the request, and if the main is blank then you could endup with n+1 requests.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Could not get you. Do you mean other ways of doing apart from import would mean it will not do the request?
     
  3. johnny.dacu

    johnny.dacu New Member

    Joined:
    Jul 6, 2010
    Messages:
    88
    Likes Received:
    4
    Trophy Points:
    0
    It was a question... I just said (but i'm waiting for someone to tell me is i'm right): when you have three css files and use anoter one to import all of them, this will endup with 4 requests (main plus other three) or is just the main (1 request)
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    The total number of requests would be same as number of files.
     

Share This Page