Reducing Page Size by JS/PHP?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • starscream
    Registered User
    • Jan 2002
    • 33

    #1

    Reducing Page Size by JS/PHP?

    I'm trying to find a script that can reduce the file size of the main page to my TGP. Right now I'm at a whopping 90k+ because of all the links, not the pics.

    I've seen a few sites that have more links than I, yet they manage to keep the file size to under 10k. After looking at their source code I see they're using a javascript to import the links from a PHP page which I cannot see. From what I understand the links are not in a DB, they can be a on a simple text file.

    Can anyone point me to a script (free or paid) or a tutorial that can show me how to do this?

    I'm about to buy some traffic but I don't want to be killed due to my main page size. Thanks!
  • chodadog
    Confirmed User
    • Apr 2002
    • 9736

    #2
    All that does, is lower the size of the actual index page. You'll still be serving just as much data 'cause the user still has to download that stuff. So you won't be saving anything in terms of bandwidth.

    The only way to make your html documents smaller, is to use one of those html optimization programs. Basically, it squeezes all the unneccessary stuff out of your documents.

    I can't think of one off the top of my head, but try a search on google. It won't be hard to find one..
    26 + 6 = 1

    Comment

    • starscream
      Registered User
      • Jan 2002
      • 33

      #3
      I'm not a javascript or php master but I do know my site is big not because of banners or images. Its because of the html code used to display and format all the links.

      What I'm talking about is different. The links do not exist on the page. They're called out in a js from another file only once clicked on so no data transfer is wasted displaying the links. The links are in txt files or something else. I know I'm not explaining this exactly how it is but from a few people I've talked to who use this do not use as much transfer as I because of it.

      Comment

      • NetRodent
        Confirmed User
        • Jan 2002
        • 3985

        #4
        Have you considered using mod_gzip to serve compressed html? It should compress text to about 1/4 of its regular size.
        "Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats."
        --H.L. Mencken

        Comment

        • Lawrence
          Registered User
          • Apr 2002
          • 7

          #5
          In addition to this link (I posted this for you on AWI), displaying your page using this javascript might also help. Your javascript disabled users won't be able to see it though.
          Last edited by Lawrence; 04-25-2002, 08:01 PM.

          Comment

          • starscream
            Registered User
            • Jan 2002
            • 33

            #6
            Thanks again Lawrence! I'll try both.

            Comment

            • chodadog
              Confirmed User
              • Apr 2002
              • 9736

              #7
              Originally posted by starscream
              I'm not a javascript or php master but I do know my site is big not because of banners or images. Its because of the html code used to display and format all the links.

              What I'm talking about is different. The links do not exist on the page. They're called out in a js from another file only once clicked on so no data transfer is wasted displaying the links. The links are in txt files or something else. I know I'm not explaining this exactly how it is but from a few people I've talked to who use this do not use as much transfer as I because of it.
              Dude, it's simple. If the user sees it, the user has to download it. There's no way of getting around it! It doesn't matter how you include the galleries.

              Give me the URL of your site, and i'll show you the .js file in my temporary internet files. The only thing you're doing, is minimising the size of the html document. The overall download however, is the same.
              26 + 6 = 1

              Comment

              Working...