[thelist] PAGE OPTIMIZATION: source readability v. download weight (not javascript function discussing :)

Peter Thoenen eol1 at yahoo.com
Wed Jun 12 16:09:01 CDT 2002


A fun easy optimization that ppl seem to forget that
shaves a little weight off is \r\n -v \n .  Want to
easily get rid of some bytes and still be readable,
open up your favorite win32 html doc in vim and tell
it to save it as a *nix filetype (not windows)..then
remove the redundent \r's ... this will save you a
byte per line and still look readable.

-Peter

--- Michael Kimsal <michael at tapinternet.com> wrote:
> Chris W. Parker wrote:
> > hi!
> >
> > i was toying with making my pages as small as
> possible and found that on
> > some of the longer pages i can take off about 10k
> of space characters
> > from the formatting of the code.
> >
> > for example...
> >
> > <table>
> >   <tr>
> >     <td>hello world!</td>
> >   </tr>
> > </table>
> >
> > becomes...
> >
> > <table>
> > <tr>
> > <td>hello world!</td>
> > </tr>
> > </table>
> >
> > -----
> >
> > now i think the second one is VERY ugly and i do
> not want to do it that
> > way. recently i came across a bookmarklet that
> measures the 'weight' of
> > the page you are viewing. i haven't examined the
> link itself, so i don't
> > know what it is counting for the weight, but i can
> say that if i remove
> > one character it goes down by 1 byte. so it's
> close enough.
> >
> > anyways... i've almost become obsessed with seing
> this number drop as
> > low as i can get it.
> >
>
<nervous-crazy-laugh>hahahaha!!</nervous-crazy-laugh>
> >
> > usually i use two spaces to indent mine tags, but
> now i'm thinking maybe
> > i'll use just one. that will cutout at least half
> of course.
> >
> > but my question to you people is "what's more
> important? the ability to
> > read the source easily through organization and
> spacing, or shaving off
> > almost 10k (depending on the length of the page of
> course) from the page
> > size?"
> >
> > news of tools, utilities, suggestions, ideas, etc.
> are welcome.
>
>
> Our PHP app server LogiCreate can do one of two
> things optionally to
> help shave off download time:
>
> 1.  Gzip the data coming down
> 2.  Strip whitespace
>
> Actually, #3 would be do both of those.  It's about
> 2 lines of code in
> the template handling code, and can often give good
> results.  If you've
> a basic page, it doesn't help much, but for larger
> pages it does wonders
> (as you're saying - 10k).  The benefit of having an
> app server do this
> is that you can switch it off.  Keep the whitespace
> for debugging
> purposes - strip the whitespace in 'production'.
> You still keep
> your template files with the whitespace intact for
> reediting purposes.
>
> Yes, it's a shameless plug, but I hope it at least
> gives you
> some ideas.  ;)
>
> Michael Kimsal
> http://www.logicreate.com
> 734-480-9961
>
>
>
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com



More information about the thelist mailing list