1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to optimize code to reduce page load time

Discussion in 'HTML & Website Design' started by webcosmo, May 14, 2007.

  1. #1
    I am trying to reduce the page load time for my site
    http://www.webcosmo.com
    This site is hybrid of css and html.
    Any ideas would be appreciated.
     
    webcosmo, May 14, 2007 IP
  2. erotomania

    erotomania Banned

    Messages:
    291
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try to use Div instead of table
     
    erotomania, May 14, 2007 IP
  3. haxanstudios

    haxanstudios Member

    Messages:
    46
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #3
    you can use divs instead of tables.
    you can optimize css.
    make the webpage XHTML 1.0 compliant.

    Optimize server backend processing.
    I noticed you have a lot of stuff coming from database. If this is so, you might need to optimize database. There are database experts who can guide you through this.
     
    haxanstudios, May 14, 2007 IP
  4. SpringCypress

    SpringCypress Well-Known Member

    Messages:
    316
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    108
  5. vvm

    vvm Peon

    Messages:
    19
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    See the link: *validator.w3.org*
    (Failed validation, 386 errors) You need big optimization for this project.
    Look here: how long your site is loading: *webwait.com*
     
    vvm, May 15, 2007 IP
    WebHive and zdestiny like this.
  6. webcosmo

    webcosmo Notable Member

    Messages:
    5,840
    Likes Received:
    153
    Best Answers:
    2
    Trophy Points:
    255
    #6
    thank you.
     
    webcosmo, May 16, 2007 IP
  7. painthappy

    painthappy Peon

    Messages:
    93
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #7
    It can also depend on your server... and how many processor calls are being made to produce your code.

    The less calls, the faster the load. You may not have control over this if it is not custom code, but if it is on a "shared" server, with low ram, etc... that would also affect it I believe.
     
    painthappy, May 16, 2007 IP
  8. webcosmo

    webcosmo Notable Member

    Messages:
    5,840
    Likes Received:
    153
    Best Answers:
    2
    Trophy Points:
    255
    #8
    i am using a dedicated server with 2G ram. I think server is no problem here.
     
    webcosmo, May 20, 2007 IP
  9. Sepehr

    Sepehr Peon

    Messages:
    568
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #9
    As others said if you could use div tags instead of tables that would make it much lighter! and that's not for 1 page! when you use tableless XHTML+CSS then all your site pages are using just 1 css file that was loaded on the first page but when you use tables the main structure of your page is being load each time a user goes to a new page!

    vvm i thought w3c validation is just for having same look on most browsers and didn't know that it helps on load time , can you give me some details on that?
     
    Sepehr, May 20, 2007 IP
  10. ice26

    ice26 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Kill the tables ;)
     
    ice26, May 21, 2007 IP
  11. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #11
    You have nearly 400 html syntax errors[1], and you lack a complete DTD. Both cause the rendering engine to work harder/slower.

    Your html file is 90kB+. That's horrible, considering that there are only 312 words of content text, totaling 2089 characters. See your Web Page Speed Report. Refactor as well structured, semantic and valid html.

    The css files are way too large. You're either not using the cascade properly, or you're micro-managing due to the table layout's lack of proper structure. It will be easier to cut the css down after you've refactored the html.

    What does the javascript do that's all so important? An 8k script would be one thing if this were a comprehensive web application, but for this, it's overkill.

    cheers,

    gary

    [1] Why would you use Microsoft Visual Studio 7.0? It's notorious for making life difficult for web developers who care about doing things correctly.
     
    kk5st, May 21, 2007 IP
  12. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Well, despite being a table-based Web site, it took only 15 seconds to load in Opera 9.2 on my 56k dialup connection.

    Whatever you do, don't abuse DIVs the way many abuse tables. Use the proper markup for the job. If you're marking up a list of links, use a list. If you need a heading, use the appropriate heading tags.
     
    Dan Schulz, May 22, 2007 IP
  13. RectangleMan

    RectangleMan Notable Member

    Messages:
    2,825
    Likes Received:
    132
    Best Answers:
    0
    Trophy Points:
    210
    #13
    RectangleMan, Mar 8, 2008 IP
  14. Codythebest

    Codythebest Notable Member

    Messages:
    5,764
    Likes Received:
    253
    Best Answers:
    0
    Trophy Points:
    275
    #14
    Clean all blank space and put height and width to everything. On the contrary of what other said, you can use and abuse table but always put the width and height to them.
     
    Codythebest, Mar 8, 2008 IP
  15. Rimki

    Rimki Peon

    Messages:
    733
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Site is down for me. :)
    I'd suggest trying to go fully CSS based.
     
    Rimki, Mar 8, 2008 IP
  16. Codythebest

    Codythebest Notable Member

    Messages:
    5,764
    Likes Received:
    253
    Best Answers:
    0
    Trophy Points:
    275
    #16
    And the dude might be dead by now...
     
    Codythebest, Mar 8, 2008 IP