MyBB Community Forums

Full Version: Compress/optimize html
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
ok so I'm compressing my html pages, and I'm using this little script http://www.dynamicdrive.com/dynamicindex...glider.htm that adds a copyright block of code to the head section, which I must keep for legal use. My question is, as the html will be compressed into one line only, will it be considered as "removing" the copyright or something? It will still be there, just not quite visible.. Toungue
For the few linebreaks that the copyright adds in, I don't know if you should even bother removing them.
Well they require that you keep it as it is, including whitespace.

My suggest is that you put all of your HTML into 1 line, and then add this below that (making it 4 lines):

<!----------------------------------------------------------
Featured Content Glider script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
This notice must stay intact for legal use
----------------------------------------------------------->
Add the copyright below everything?
That's correct.
hmm seems the best solution to me, thanks. Too bad I have to add 1 comment per script (even though I'm only using 1 script, for now).
(2010-01-01, 11:42 PM)faviouz Wrote: [ -> ]the html will be compressed into one line only

compression is already done by gzip and saves you more bandwidth than removing whitespace ever could

if your purpose is obfuscation, a html formatter like tidy will re-add the whitespace you removed and produce a more readable result than what stock mybb does

in other words, doing this is rather pointless
I never really heard of HTML compression beign any great optimization, I read it's slightly different story for CSS and a bit more for JS.
Not really - not terribly different for HTML/CSS/Javascript if you're using gzip. For most webpages, you'll probably save about 1KB at best by removing whitespace. If not using gzip, possibly a bit more, but in most cases, it's insignificant.

Am unsure what effect you get if you combine with a Javascript packer though.
(2010-01-02, 12:20 AM)frostschutz Wrote: [ -> ]
(2010-01-01, 11:42 PM)faviouz Wrote: [ -> ]the html will be compressed into one line only

compression is already done by gzip and saves you more bandwidth than removing whitespace ever could

if your purpose is obfuscation, a html formatter like tidy will re-add the whitespace you removed and produce a more readable result than what stock mybb does

in other words, doing this is rather pointless
This isn't for MyBB, it's for my website. No software involved, just plain html.
@combus well you never know if it helps, and yes CSS and JS get way more optimized than html.
Pages: 1 2