SitePoint Sponsor

User Tag List

Results 1 to 25 of 25

Hybrid View

  1. #1
    SitePoint Member Hamad Mansoor's Avatar
    Join Date
    Sep 2003
    Location
    Bahrain Kingdom
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Does CSS slows the loading of the page??

    Hi every one

    I Have just started my 1st project that I tryed to use only the CSS

    I Have put all the classes in one include file (style1.css)

    its work fine BUT ITS SLOW ?!!!

    AND NO heavy images or complecated functions is there ?

    so I thought that maybe because its calling all the styles class then its load the web pag ?

    any one have any hint to help me ?

  2. #2
    SitePoint Member Hamad Mansoor's Avatar
    Join Date
    Sep 2003
    Location
    Bahrain Kingdom
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Css and speed

    Actualy its a quesion not areplay !

    I have make one project with CSS and i put all the classes in one include file (style1.css)
    but i notice that the site is slow !?
    i dont have large images or complecated functions
    so any hint ?
    thanx

  3. #3
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,811
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This really needs a thread of its own, so I'm splitting it...

    Couple of questions:

    How large (in bytes) is your .css file.
    Same Q about your html file.
    Same Q about all images for the page.

    Next....who do you host with? Free host or paid?
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  4. #4
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,811
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Please ask questions only ONCE on these boards
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  5. #5
    SitePoint Member Hamad Mansoor's Avatar
    Join Date
    Sep 2003
    Location
    Bahrain Kingdom
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My style sheet size is 8.03 KB

    My project totaly with incude folder , imagesfolder, and the asp + htm pages is 14.1 MB

    i am hosting it on our own company server..
    we make much biger and complecated projects than this one but without Css and its works fine !?
    ok any more questions , i will be happy to answer

    Notice: I am sorry for posting twice but i am confused little
    thanx

  6. #6
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    The web page will be retrieved as will the external CSS file but since files tend to be cached and may people use corporate theming the cached CSS will be reused.

    Posting a link to the page - assuming its not an intranet - might be of some use as was previously stipulated to some extent it depends upon the size of the CSS file and how the classes have been used and whether the syntax used is well-formed.
    Last edited by xhtmlcoder; Sep 18, 2003 at 05:14.

  7. #7
    SitePoint Member Hamad Mansoor's Avatar
    Join Date
    Sep 2003
    Location
    Bahrain Kingdom
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any one else can Help

  8. #8
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    How are you including the stylesheet in your pages? <link> tags, @import, or <!--#include file="blah"-->?

  9. #9
    SitePoint Member Hamad Mansoor's Avatar
    Join Date
    Sep 2003
    Location
    Bahrain Kingdom
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I include the file by this the last way

    <!--#include file="blah"-->?

  10. #10
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You don't need to include the CSS like that - just use

    <link rel="stylesheet" href="styles.css" media="screen" />

    In the head tag somewhere so that it is cached. But the actual rendering of the pages shouldn't be slowed by CSS

  11. #11
    SitePoint Member Hamad Mansoor's Avatar
    Join Date
    Sep 2003
    Location
    Bahrain Kingdom
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ooooooops!!!
    i am realy sorry lol
    this is the way that i like the css but i gut confused when i was replaying lol
    sorry

    <link rel="stylesheet" href="styles.css" media="screen" />

  12. #12
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wink Some Thoughts

    Hello,

    Unless your server is really slow, using W3C CSS doesn't slow pages down. In fact, on 99.9% of all servers, using CSS actually speeds up the loading of pages, since a great deal of W3C (X)HTML formatting code can be replaced with only a few short lines of CSS code.

    Also, using linked style sheets are great for making site management easy--if you want to update all instances of a certain style, just change the CSS code. Every page automatically reflects the change.

    Compuwhiz7

  13. #13
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by compuwhiz7
    Hello,

    Unless your server is really slow, using W3C CSS doesn't slow pages down. In fact, on 99.9% of all servers, using CSS actually speeds up the loading of pages, since a great deal of W3C (X)HTML formatting code can be replaced with only a few short lines of CSS code.

    Also, using linked style sheets are great for making site management easy--if you want to update all instances of a certain style, just change the CSS code. Every page automatically reflects the change.

    Compuwhiz7
    Its main benefit is the reduced load time in the form of caching the stylesheet, as long as you <link> or @import the CSS file in. That's when you start to see real gain (and is also why in-document styles should be avoided) .

  14. #14
    SitePoint Member Hamad Mansoor's Avatar
    Join Date
    Sep 2003
    Location
    Bahrain Kingdom
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah and that whats makes me creazy lol
    i dont know realy .. but at least i know that it is not from using Css .. because when i read about Css i understand that its makes the loading fast .. but i said maybe i missed some thing..
    thanks guys

  15. #15
    SitePoint Enthusiast xinete's Avatar
    Join Date
    Jan 2003
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how are those 14M divided in the images? do you have video? 14M for just images sounds a lot, maybe your resolution used in your images and pictures is kind of high for website purposes

  16. #16
    SitePoint Member Hamad Mansoor's Avatar
    Join Date
    Sep 2003
    Location
    Bahrain Kingdom
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no animation .. i dont know if i can put the link here to let u see it ..if its alowed i will
    Last edited by Hamad Mansoor; Sep 22, 2003 at 04:42.

  17. #17
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,811
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    14 mb is HUGE.

    If you can post a link, please do so. The most likely culprit is less than optimum images
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  18. #18
    SitePoint Member Hamad Mansoor's Avatar
    Join Date
    Sep 2003
    Location
    Bahrain Kingdom
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    www.bahraintradanet.com\moi2\index.asp

    this is it .. and plz comment on any thing

  19. #19
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,811
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Loading it now. I will remind people not to posts "review" type posts, but simply help with the problem at hand (slow loading time).

    The correct link is: http://www.bahraintradanet.com/moi2/index.asp
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  20. #20
    SitePoint Member Hamad Mansoor's Avatar
    Join Date
    Sep 2003
    Location
    Bahrain Kingdom
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok thanks

  21. #21
    eCommerce specialist hotnuts21's Avatar
    Join Date
    Apr 2002
    Location
    Aberystwyth, UK
    Posts
    1,355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It loaded quite quickly for me, at least to start with.
    The bar at the bottom moved along quickly, and the page background colours appeared. It sort of hang for a while but nothing major. That was at the end just before everything displayed. I couldnt really a problem, maybe its a connection thing, that was my gut reaction. But overall not that bad really.
    Search & Rescue Aberystwyth Lifeboat
    CSS Tutorials/Guides

    Sitepoint signatures are not visible to Search Engines More info

  22. #22
    SitePoint Addict hurricane.uk's Avatar
    Join Date
    May 2003
    Location
    Liverpool
    Posts
    361
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The CSS is only about 8kB and won't slow it down, but the total page size is 150kB and so will be slow on dial up. The main culprits being:
    HTML: 44872 bytes
    Images: 63081 bytes
    Javascript: 53589 bytes

    Your page keeps timing out for me, so I can't check to see where it can be improved - I suspect that the html file size is so large due to any of the following: nested tables, large embedded scripts, repetetive style definitions.

  23. #23
    SitePoint Member Hamad Mansoor's Avatar
    Join Date
    Sep 2003
    Location
    Bahrain Kingdom
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok .. thanks really .. at least i feel better to hear that .

  24. #24
    eCommerce specialist hotnuts21's Avatar
    Join Date
    Apr 2002
    Location
    Aberystwyth, UK
    Posts
    1,355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah looking again the javascript files seem to be taking up a lot of room. It loaded a lot slower the second time round though
    Search & Rescue Aberystwyth Lifeboat
    CSS Tutorials/Guides

    Sitepoint signatures are not visible to Search Engines More info

  25. #25
    SitePoint Member Hamad Mansoor's Avatar
    Join Date
    Sep 2003
    Location
    Bahrain Kingdom
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its kind of looping or processing some thing while there is only the menu script... and i use it in another project it was fine


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •