small file size

liunx

Guest
How to lots of texts on a page and the file size remain small? I mean a site without much graphic just texts.<!--content-->eliminate all white space by entering all the code for the page as one continuous line in Notepad. it will be unreadable and difficult to maintain, but it will generate the minimum file size.<br />
<br />
However if it is mainly text, you should not have a problem with the file being to big unless you are crating bloated monoliths instead of building multiple page and simple navigation between pages.<!--content-->Another way to make the file sizes smaller, I think, is to use SSI, server-side includes. That is, assuming your host will permit them. Here's a link with more information on those:<br />
<br />
<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=25590">http://www.htmlforums.com/showthread.ph ... adid=25590</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=25616">http://www.htmlforums.com/showthread.ph ... adid=25616</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=25644">http://www.htmlforums.com/showthread.ph ... adid=25644</a><!-- m --><br />
<br />
Or, I suppose, you could use iframes. Put the majority of the text inside the iframe.<br />
<br />
Another way to make individual pages smaller is to break the text up at logical points and have them on another page. <shrug> If you want, you're welcome to wander around my site (<!-- m --><a class="postlink" href="http://www.peg-as-is.com">http://www.peg-as-is.com</a><!-- m -->) and see how I've handled 5,000 to 10,000 word stories. The maximum length of any page works out to about 3,000 words per page. I had actually been aiming for 1,000-1,500 words per page, but I got lazy. ;)<br />
<br />
Peg<!--content-->hehe, well ssi does make your html page look a whole lot leaner but at the end of the day it doesn't, seeing as it's calling the code/content in from somewhere else.<br />
<br />
webfreaks, i think you need to expand on your question a bit. :)<!--content-->hmm.. I didn't know white space take up space also.. no wonder how I reduce the grahpic my file size still very big.. Thanks!<!--content-->save your images as .jpg, it has the highest compression rate, photoshop has a good 'save for the web' feature but is also pricy, try<br />
<!-- m --><a class="postlink" href="http://www.irfanview.com/">http://www.irfanview.com/</a><!-- m --><br />
<br />
:) <br />
<br />
do you have a url to have a look at the page?<!--content-->Yes and no, Leo. I'm not sure why it worked out that way, but my pages created by SSI, including the individual file sizes, are smaller than the same page done in one piece. And the SSI pages seem to load faster, as well.<br />
<br />
And yes, even 'whitespace' takes up room in a file. Both 'return/enter' and 'spacebar' require keystrokes which are included in the file, whether we see them or not.<br />
<br />
I don't know about sticking everything on one line. <shudder> Pages like that are a nightmare to try to troubleshoot. At the very least, make sure your code is as compact as you can make it. <br />
<br />
If you put your stylesheet information on a separate page and link to it, that might cut down the page size a bit. If you're using a WYSIWYG editor like FrontPage or Dreamweaver, you should take a look at the code and delete anything that the programme has stuck in there about "page created by" and other 'not-needed-for-the-page' information.<br />
<br />
You wouldn't need to leave a linespace between your paragraphs, either. The <p> tag is easy enough to spot as you're going down the code. And watch the coding. Some programmes will code " as &quot. That could almost be considered unnecessary code. <br />
<br />
From the sounds of it, though, the problem isn't the multitude of text, but the size of the graphics. The 'rule of thumb' I learned was no more than 20k for gifs on a page and no more than 50k total for jpgs. *g* But that was a while ago.<br />
<br />
Peg<!--content-->Originally posted by Pegasus <br />
Yes and no, Leo. I'm not sure why it worked out that way, but my pages created by SSI, including the individual file sizes, are smaller than the same page done in one piece. And the SSI pages seem to load faster, as well.<br />
<br />
<br />
Hmm, interesting, i've not actually researched it but from the theory the end file size should be the same? i wonder why that is then, have to look into it when i get some time :D<!--content-->if I am understanding this correctly.<br />
<br />
if you have a 2k index file and it has 3 SSI inlucdes in it (2k a piece) the total file size should be 8k altogether. it is impossible fo rit to be smaller than before it is called. the end file size is what is being displayed in the browser when you are viewing it. this is not including graphics. that is just html code. the overall file (page size) includes graphics. if you get up and around 100k then you better re-think your page. with graphics and all code a page shouldn't be more than 20-30k, to load on a 56k modem in a reasonable time.<!--content--><furious blush> Okay, I've figured out how I get such a size discrepancy. It's not the file sizes, per se, but the way my computer sees them. It notes files as multiples of 4k, not as the actual file size. I have 3 - 8k files added to a 4k SSI page. It should be 28k total, but it's not. The files are actually 5k, 7k, and 6k, and the SSI page is just over 2k, for a total of just over 20k. Which is the total size I get when I see the page. <br />
<br />
I knew that Macs did that, I just forgot. My apologies.<br />
<br />
And that's including the graphics! *e2eg* I'm getting better!<br />
<br />
Peg<!--content-->
 
Back
Top