By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,665 Members | 1,513 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,665 IT Pros & Developers. It's quick & easy.

Is it safe to compress & reformat web-page HTML at will? Recommend any compression tool?

P: n/a
Dreamweaver 4

Hi

Can anyone recommend a decent utility for compressing
HTML that is safe - i.e. that *definitely* doesn't mess
with the appearance in any browsers.

I run a growing website whose pages are inexorably getting
too "heavy".

I want to be able to compress the HTML for use
and then to "Apply Source Formatting" (DW4) at will
in order to debug.

- Is it safe to compress and reformat web-page HTML at will?

Background:
I understand the target is (or used to be!) 40KB per page,
but we are now struggling to keep our pages under 100KB
(including graphics)
Ship
Shiperton Henethe
Jul 20 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Shiperton Henethe wrote:
[snip]
I run a growing website whose pages are inexorably getting
too "heavy".

I want to be able to compress the HTML for use
and then to "Apply Source Formatting" (DW4) at will
in order to debug. [snip] Background:
I understand the target is (or used to be!) 40KB per page,
but we are now struggling to keep our pages under 100KB
(including graphics)


Just a comment. Have you tried compressing just one page "by hand" to see how
much potential there is?

For example, if you can make a 100KB page into (say) a 75KB page, you have a
good case. But if it only makes it into (say) a 95KB page, your problems lie
elsewhere, at least initially.

Also, have you experimented with the D4 "Code format" preferences?

(I will watch this thread with interest - I too use D4 & ASF to make the
source easy to read! I just tried a 54KB page and it reduced to 44KB with hand
compression).

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #2

P: n/a

"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote in message
news:g_**************@newsfep1-gui.server.ntli.net...
Shiperton Henethe wrote:
[snip]
I run a growing website whose pages are inexorably getting
too "heavy".

I want to be able to compress the HTML for use
and then to "Apply Source Formatting" (DW4) at will
in order to debug. [snip]
Background:
I understand the target is (or used to be!) 40KB per page,
but we are now struggling to keep our pages under 100KB
(including graphics)


Just a comment. Have you tried compressing just one page "by hand" to see

how much potential there is?
Yes I just tried stripping out various things such as spare
spaces and/or tabs and carriage returns by themselves and this help quite a
lot. (8K out of 46K)

This was rather tedious and I had to use HomeSite to do it though.

For example, if you can make a 100KB page into (say) a 75KB page, you have a good case. But if it only makes it into (say) a 95KB page, your problems lie elsewhere, at least initially.

Also, have you experimented with the D4 "Code format" preferences?

Well, frankly DW4 is totally bizarre.

DW4 seems to be indenting <TABLE> with one space and
<TR> using two spaces. Butd is indented with either <TD> with
either three spaces OR a single tab depending how it's feeling
at the time. (Remember I had stripped out ALL of these before
so that each line started bang up against the left margin).

My 35.7KB gets nearly 3KB of extra characters added by
the Code formatting.

FWIW my "code format" settings are:
Indent yes, Use tabs, Indent table rows and columns
indent size =1, Tab size=3, no automatic wrapping...
Ship
Shiperton Henethe







Jul 20 '05 #3

P: n/a
Shiperton Henethe wrote:
"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote in message
news:g_**************@newsfep1-gui.server.ntli.net...
Shiperton Henethe wrote:
[snip]
> I run a growing website whose pages are inexorably getting
> too "heavy".
>
> I want to be able to compress the HTML for use
> and then to "Apply Source Formatting" (DW4) at will
> in order to debug. [snip]
> Background:
> I understand the target is (or used to be!) 40KB per page,
> but we are now struggling to keep our pages under 100KB
> (including graphics)


Just a comment. Have you tried compressing just one page "by hand"
to see how much potential there is?


Yes I just tried stripping out various things such as spare
spaces and/or tabs and carriage returns by themselves and this help
quite a lot. (8K out of 46K)


Useful, but still only part of the journey from 100KB to 40KB!

I've added some more suggestions below.
This was rather tedious and I had to use HomeSite to do it though.

[snip]

Yes! I was only suggesting it as an experiment, not as the way to go for the
future. (I used Word because its "find & replace" is something I am familiar
with, and it has macros. But only for a one-off experiment).

If your content really is big, you are stuck with it. (You could perhaps split
pages). But here are some other possibilities, depending on your
circumstances:

- I used to have a lot of GIF-buttons with roll-over Javascript. I got into
CSS originally just to get rid of all that. If CSS only did buttons, I would
still be a fan! (Every page had the Javascript for rollover on it - perhaps I
could have linked to it? But, worst of all, all the up buttons had to be
loaded to see the home page, and the hover buttons were also preloaded).

- Getting rid of "font" and replacing it with CSSs helped some of my pages a
useful, but not spectacular, amount.

- I note you said "graphics". Something I have seen on some photography sites
is the use of full sized images as thumbnails, resized by attributes in the
"img" tag, instead of use of real thumbnails. (Sorry if I am pointing out the
obvious there!)

- Have you optimised the compression of any photographs? I see a lot of
non-optimum compression of JPEGs around, mostly over-compressed but some
under-compressed.

- If your graphics are GIFs, have you investigated PNG? (I still use GIFs, but
I don't have vast numbers. I have heard that PNG can be smaller in some cases.
I don't know how good its browser support is).

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #4

P: n/a
"Shiperton Henethe" <sh*****@yahoo.com> schrieb im Newsbeitrag
news:3f***********************@news.easynet.co.uk. ..

Background:
I understand the target is (or used to be!) 40KB per page,
but we are now struggling to keep our pages under 100KB
(including graphics)


How much of that is code, how much graphics? If graphics make most of the
data just put your effort in better image compression.

Do you use tables for layout? I like to use DW, too, but it makes it very
easy to use exorbitant table layouts for what you could achieve with css
formatting. In earlier days I made some sites with table cells filled with
spacer gifs around every text filled cell, just to achieve the appropriate
space around each text paragraph. You can do the same with one single line
in the css file where you define the margins of the <p> element.

I don't say you work like this, but as you did not provide an URL it is my
guess, as it needs really a huge lot of content for a 100KB web page!

--
Markus
Jul 20 '05 #5

P: n/a

"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote in message
news:wa***************@newsfep1-gui.server.ntli.net...
Shiperton Henethe wrote:
"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote in message
news:g_**************@newsfep1-gui.server.ntli.net...
Shiperton Henethe wrote:
[snip]
> I run a growing website whose pages are inexorably getting
> too "heavy".
>
> I want to be able to compress the HTML for use
> and then to "Apply Source Formatting" (DW4) at will
> in order to debug.
[snip]
> Background:
> I understand the target is (or used to be!) 40KB per page,
> but we are now struggling to keep our pages under 100KB
> (including graphics)

Just a comment. Have you tried compressing just one page "by hand"
to see how much potential there is?
Yes I just tried stripping out various things such as spare
spaces and/or tabs and carriage returns by themselves and this help
quite a lot. (8K out of 46K)


Useful, but still only part of the journey from 100KB to 40KB!

I've added some more suggestions below.
This was rather tedious and I had to use HomeSite to do it though.

[snip]

Yes! I was only suggesting it as an experiment, not as the way to go for

the future. (I used Word because its "find & replace" is something I am familiar with, and it has macros. But only for a one-off experiment).

If your content really is big, you are stuck with it. (You could perhaps split pages). But here are some other possibilities, depending on your
circumstances:

- I used to have a lot of GIF-buttons with roll-over Javascript. I got into CSS originally just to get rid of all that. If CSS only did buttons, I would still be a fan! (Every page had the Javascript for rollover on it - perhaps I could have linked to it? But, worst of all, all the up buttons had to be
loaded to see the home page, and the hover buttons were also preloaded).

- Getting rid of "font" and replacing it with CSSs helped some of my pages a useful, but not spectacular, amount.
Someday I suppose, but for now I cant be bothered with the hassle/benefit
ratio!

- I note you said "graphics". Something I have seen on some photography sites is the use of full sized images as thumbnails, resized by attributes in the "img" tag, instead of use of real thumbnails. (Sorry if I am pointing out the obvious there!)

- Have you optimised the compression of any photographs? I see a lot of
non-optimum compression of JPEGs around, mostly over-compressed but some
under-compressed.
I dont think there's much further that we can take the compression
and still feel high quality.

The sight I have been helping and advising is www.auction-air.com if you're
interested.

- If your graphics are GIFs, have you investigated PNG? (I still use GIFs, but I don't have vast numbers. I have heard that PNG can be smaller in some cases. I don't know how good its browser support is).


I use something called XaraX which is excellent.
I havent worked out how to get it to spit out PNG files yet.

Ship
Shiperton Henethe


Jul 20 '05 #6

P: n/a

"Markus Ernst" <si***********@gmx.ch> wrote in message
news:3f*********************@news.easynet.ch...
"Shiperton Henethe" <sh*****@yahoo.com> schrieb im Newsbeitrag
news:3f***********************@news.easynet.co.uk. ..

Background:
I understand the target is (or used to be!) 40KB per page,
but we are now struggling to keep our pages under 100KB
(including graphics)
How much of that is code, how much graphics? If graphics make most of the
data just put your effort in better image compression.

Do you use tables for layout? I like to use DW, too, but it makes it very
easy to use exorbitant table layouts for what you could achieve with css
formatting. In earlier days I made some sites with table cells filled with
spacer gifs around every text filled cell, just to achieve the appropriate
space around each text paragraph. You can do the same with one single line
in the css file where you define the margins of the <p> element.


Yes the site uses tables and pixels. I didnt realise there was any
other way that copes with different browser font sizes...
I don't say you work like this, but as you did not provide an URL it is my
guess, as it needs really a huge lot of content for a 100KB web page!


I have been advising this site www.auction-air.com

All feedback welcome. I dont think there is much scope for any
further compression of images without quality suffering, and this
site needs to look extremely good because it is selling such high-ticket
items...

Maybe they should just remove two or three lots from the home page...

All feedback welcome.
Ship
Shiperton Henethe




Jul 20 '05 #7

P: n/a
On Fri, 10 Oct 2003 14:04:15 +0100, "Barry Pearson"
<ne**@childsupportanalysis.co.uk> wrote:
- If your graphics are GIFs, have you investigated PNG? (I still use GIFs, but
I don't have vast numbers. I have heard that PNG can be smaller in some cases.
I changed to PNGs a while ago. (Well, started to - there may still be a
few GIFs lurking somewhere.) After application of the pngcrush tool,
nearly all were smaller than the original GIF. A couple of very small
images remained the same size. The reduction ranged from about 8% to
over 40%.
I don't know how good its browser support is).


For opaque PNGs, near enough 100% of those that support GIFs, I
understand. Transparancy in PNGs is not reliably supported by NN4. Alpha
transparency isn't supported by any IE version, but then you don't have
that in GIFs anyway.

I would now only use GIFs if transparency were needed and good NN4
support was very important (University site or similar). Or if I could
think of a good reason for having an animated image.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #8

P: n/a
Stephen Poley wrote:

I changed to PNGs a while ago.
After application of the pngcrush tool,
nearly all were smaller than the original GIF.


Is PNG Crush a converter? Or just a compression utility? Do you
recommend any program for gif to png conversion?

--
Brian
follow the directions in my address to email me

Jul 20 '05 #9

P: n/a
On Sat, 11 Oct 2003, Brian wrote:
Is PNG Crush a converter?
Does it have any HTML in it? Is there a newsgroup called
comp.infosystems.www.authoring.images - which the image experts
somehow studiously avoid?

Is there a search engine called Google, whose first hit for
pngcrush seems to be the answer to your question?
Or just a compression utility? Do you
recommend any program for gif to png conversion?


For all manner of image conversions "by rote", I'd recommend the
netpbm package. Free and effective.

http://netpbm.sourceforge.net/

If you want to convert and optimise images by hand, there's any number
of point-and-click packages, depending on the size of your purse.

cheers

[x-posted and f'ups suggested]
Jul 20 '05 #10

P: n/a
"Shiperton Henethe" <sh*****@yahoo.com> schrieb im Newsbeitrag
news:3f*********************@news.easynet.co.uk...

I have been advising this site www.auction-air.com

All feedback welcome. I dont think there is much scope for any
further compression of images without quality suffering, and this
site needs to look extremely good because it is selling such high-ticket
items...

Maybe they should just remove two or three lots from the home page...

All feedback welcome.


Well it's 38KB of code. I guess you could reduce it by about 50% by
designing it with CSS instead of tables and font tags. Well, just a guess.

--
Markus
Jul 20 '05 #11

P: n/a
Shiperton Henethe wrote:
Can anyone recommend a decent utility for compressing
HTML that is safe - i.e. that *definitely* doesn't mess
with the appearance in any browsers.


mod_gzip or php can both compress the pages (zip) whle delivering and
most browser unzip them before displaying the page. browser which do not
support this get a non-zipped page.

this is the default answer for your question for 6 years or longer :)
Jul 20 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.