Results 1 to 7 of 7
Thread: Compressing HTML
-
11-12-2003, 11:11 AM #1Web Hosting Guru
- Join Date
- Mar 2003
- Posts
- 345
Compressing HTML
Anyone can suggest a good and decent software to compress HTML file ?
Thanks
-
11-12-2003, 11:36 AM #2Web Hosting Guru
- Join Date
- Mar 2003
- Posts
- 345
Ah, I found one
http://www.alentum.com/ahc/index.htm
I tried it to compress my site, and it's working fine Reducing about 20%-30% for each html file
-
11-12-2003, 11:48 AM #3Web Hosting Guru
- Join Date
- Mar 2003
- Posts
- 345
Hmmm, but it did not remove -> alt=""
I think we dont need those alt=""
-
11-12-2003, 12:06 PM #4Aspiring Evangelist
- Join Date
- Jan 2002
- Location
- Adelaide, Australia
- Posts
- 405
It's a good idea to have alt tags for those who browse with images off, use devices to assist in web browsing or simply want to know which image is loading where.
Use mod_gzip if you can - it will compress your html (as it's all text) a lot on the fly.
actually that program looks pretty weird.... removing doctype declarations and removing quote marks (bit dodgy IMO). If you really are so hard pressed for bandwidth that you think you need to compress your html, I suggest you use stylesheets (CSS) and lay off using tables unless absolutly needed.
-
11-12-2003, 12:25 PM #5Web Hosting Guru
- Join Date
- Mar 2003
- Posts
- 345
Yes, I agree with you. I just playing around with that html compression (optimizer).
I will use mod_deflate at the end.
-
11-12-2003, 02:23 PM #6Web Hosting Master
- Join Date
- May 2001
- Location
- Dayton, Ohio
- Posts
- 4,977
PHP Code:$pagetext=preg_replace ("/(\>)(\s*)(\\r\\n)*(\s*)(\<)/", '\\1\\5', $pagetext);
This will remove any returns in the code except for returns inside tags themselves..
-
11-12-2003, 06:58 PM #7Web Hosting Master
- Join Date
- May 2002
- Location
- UK
- Posts
- 2,997
Originally posted by kapot
Hmmm, but it did not remove -> alt=""
I think we dont need those alt=""
I don't know your location but here in the UK accessibility of websites is a legal requirement these days.