+ Reply to Thread
Results 1 to 2 of 2

Thread: Reduce HTML File Size

  1. #1
    Barn Frequenter BLaaaaaaaaaarche will become famous soon enough BLaaaaaaaaaarche will become famous soon enough BLaaaaaaaaaarche's Avatar
    Join Date
    Mar 2008
    Posts
    188
    Rep Power
    5

    Reduce HTML File Size

    Does anyone know if the size of an HTML file is based upon the number of rows or is it simply based upon the amount of data in the file? For instance, I am creating a very large file -- 7.5MB when fully processed -- which has tens of thousands of lines of code. It is essentially one very large table. The design is like so:

    Code:
    <table>
      <tr>
        <td></td>
      </tr>
      <tr>
      ....
      ....
    </table>
    
    If I changed my code to such:

    Code:
    <table><tr><td></td></tr><tr>......</table>
    
    Would this reduce the size of the file?? Essentially, I am getting rid of whitespace by reducing the number of lines breaks in my file....
    "You'll never be as perfect as BLaaaaaaaaarche."

  2. #2
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    Yes, spaces and tabs add to the file size.

    You can run a quick test yourself. Create a text document and add:

    test test test test test

    Right-click it and click properties. View the file size.

    Then, remove the spaces, save it, and view the file size again. You'll notice there is a difference.
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


+ Reply to Thread

Similar Threads

  1. How to insert variable html into php
    By evdv in forum PHP Development
    Replies: 1
    Last Post: January 14th, 2009, 08:54 PM
  2. upload file field (restrict filename size?)
    By Rebelle in forum ASP Development
    Replies: 7
    Last Post: January 6th, 2009, 06:08 PM

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

SEO by vBSEO