473,324 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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

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
11 2454
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

"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
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
"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

"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

"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
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
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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: pdav | last post by:
Hi! Is there any solution to create a directory with one script with mkdir(), and then write a file (or move an uploaded file) in this directory with another script? The problem is, that the...
0
by: RayL | last post by:
Does anyone know if there are any problems using SWT with Java Web Start or if Eclipse's SWT has anything comparable? (I'm want the features of a heavyweight client but the easy deployment of a...
0
by: One Handed Man \( OHM - Terry Burns \) | last post by:
I have implemented the System.Web.UI.IPostBackDataHandler.LoadPostData interface in my custom control, however, when I submit this Function is not called by ASP.NET ( Which is what I assume is...
6
by: Bryan Dickerson | last post by:
(Newbie Alert!!) Is there a way to generate a Web Service from a WSDL file? Or does this not make sense? -- TFWBWY...A
2
by: gumairu | last post by:
http://www.is.in.th/ http://marketathome.com/ http://tarad.com/ Free Complete Website for all people easy fast
3
by: Rik | last post by:
Hello, first of all, my provider sucks, newsserver is down for the #nth time now, offcourse when I have an urgent question.... So this will be me first time using Google Groups, forgive me if...
1
by: Ralph | last post by:
is the & charater not allowed in a web.config file? If so is there a way to escape it? I've never had this happen, but in a web.config file 1.1 framework app. It seems to be choking in a string...
1
by: trs204 | last post by:
For moving the files, planning to use like this..... find / -iname "*.txt" -type f -exec /bin/mv {} /mnt/bckup \; I want to do compressing before moving the files. Please suggest. I am not sure,...
3
by: solargovind | last post by:
Hi, I have finished my project in Ms Access 2000. My operating system is Windows'98. My file Size is 15916 KB Now, I hve below queries which i need to clarify with you.
1
by: smeel | last post by:
Hi Guys, I'm experimenting with Web Services and would like to know how to use a WSDL file that is hosted on another computer. In the C#.NET language In Visual Web Developer I have already...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.