illusionist
08-24-2003, 06:21 PM
I use advanced html optimizer and gif optimizer....so the gif load a lil faster. Any other way of optimizing an html page? I heard of something called data pipe or something and zipping the html page?
![]() | View Full Version : Decreasing html page size? illusionist 08-24-2003, 06:21 PM I use advanced html optimizer and gif optimizer....so the gif load a lil faster. Any other way of optimizing an html page? I heard of something called data pipe or something and zipping the html page? Luxore 08-24-2003, 06:26 PM tune pages by hand leave out idiotic javascript frills css Synthetic 08-24-2003, 10:02 PM I suggest reading this (http://www.sitepoint.com/article/1106) article, I found it to be rather helpful. illusionist 08-25-2003, 03:35 AM I have 2000 pages so doing it by hand is not an option:( ....thanx for the article pretty kool:) abang 08-25-2003, 03:54 AM a pretty good CSS would actually be the best and fastest solution... eXaion 08-25-2003, 04:57 AM Originally posted by illusionist I have 2000 pages so doing it by hand is not an option:( ....thanx for the article pretty kool:) Well.....if your website code has some consistency at some points, softwares like CuteHTML can do a search and replace on many documents at the same time....that is if there's bit of code the same.... Daijoubu 08-25-2003, 06:09 AM GZIP :) And make use of caching and external css khuti 08-25-2003, 10:06 PM well to be honest the best way is to learn to hand code....coz then u no wot is happening in ur code. if u use the editors they always add uneeded junk code.....especially Frontpage yuk h8 it.. then i would suggest learnin CSS as said above...dont listen to these peeps sayin i have 2000 pages...there are things called include files so u only have to rite the code out once :P hope to have been sum help if u want anything just gimme a shout :) Dan L 08-25-2003, 10:06 PM I keep all my JS and CSS in external files, use divs instead of tables, and split everything up with PHP. That seems to keep everything easy. illusionist: Try using these methods and your page will be MUCH faster. Maybe even some MySQL. If all the pages are coded identically, I'm sure someone could work with you if you throw out a job in another forum. Just imagine if you wanted to add another item to the menu or change the copyright. ;) Rich2k 08-26-2003, 04:54 AM Fine in principle to hand code everything. In an enterprise environment it's not always feasable with timescales. However a close second is to generate the HTML with software and then clean it up by hand (although dreamweaver is pretty good at html and css these days). Then you only need to clean/optimise once as you can template the site then (and I don't mean dreamweaver templates). Ionsurge 08-26-2003, 06:50 AM Rich2k: In contrary, Dreamweaver is pretty poor, and generates a lot of invalid code, hopefully v2004 will generate content that is actually valid html. If you use anything, I'd completely recommend the use of either UltraEdit 10, SciTE or TopStyle Pro 3.10, they are all good, the latter even provides an inbuilt Validator. Daijoubu: GZIP optimises server speed. The HTML output can only be sped up through decreasing it's size. The best thing would be to convert your site into server side code, instead of html, if it isn't, and make it involve databases to extract data. That would speed it up at the server end. I would recommend the use of a template system, SO_PTP is a good example of this, which will come around over the next few months. That will dramatically increase the speed to load. In relation to using optimised GIF's, you may comprimise professionality in that you may cause a visual decline in the quality of your images. That is not good. In regards to using a tableless layout, via CSS use, it would be a good idea, but cross-browser compatitibility is difficult to achieve when involving relative positioning of objects. You will have to delve into CSS3 in order to understand this further. To test it, use the four major browsers, Internet Explorer, Opera, Netscape and Mozilla, however, Konqueror is also recommended. www.w3schools.org will help you understand how to go through writing better HTML. I hope that helps. :) Rich2k 08-26-2003, 07:03 PM Dreamweaver MX in my experience does NOT generate any w3C invalid code (so long as you have a namespace and doctype at the top, which you should anyway!) I have generated entire sites in Dreamweaver (for fun :rolleyes: ) and they all validated with the W3C first time. If you know how to use Dreamweaver properly it works very well. I spent a while getting Macromedia Certified and there is a lot of stuff their software does that you never released it could do until you look properly. BTW you might want to loose that extra </span> tag on your front page as it causes it to fail validation. Daijoubu 08-26-2003, 10:27 PM GZIP may not decrese the physical size of the html but it decrease the download dramaticly ;) a 35kb html is compressed down to 5kb eh PhilG 08-26-2003, 11:02 PM interesting thread... I always catch myself having defaults written into the code like: <td align="left" valign="middle">text</td> is the same as <td>text</td> also if you have any img tags like: <img src="/images/file.gif" border="0" alt=""> same as(when not in hyperlink): <img src="/images/file.gif"> Things like this can make a difference when your pages are viewed 100000 times a day. Also if you want to get really keen, take out all the quotes :-) <tag attribute="0"> to <tag attribute=0> There are my tips :-) ken124578 08-27-2003, 12:57 AM Originally posted by PhilG <tag attribute="0"> to <tag attribute=0> No, that's just bad coding. The rest is okay though. :P;) PhilG 08-27-2003, 01:13 AM why is this bad coding? Explain yourself :-) Rich2k 08-27-2003, 05:33 AM Originally posted by PhilG interesting thread... I always catch myself having defaults written into the code like: <td align="left" valign="middle">text</td> is the same as <td>text</td> Actually not always :) If you have your doctype set to xhtml with an xhtml namespace. Then <td> alignment is sometimes inherited (I've never actually tracked the exact nature of this). You can end up with a centre aligned <td> when your <table> or parent <td> (in nested tables) is align="center" Ionsurge 08-27-2003, 11:36 AM The aligned="center" is poor coding in itself. The use of tables for code is even worse. Anything done in a table can easily be done with the use of <div>'s with CSS very simply. Ionsurge 08-27-2003, 11:38 AM By the way, Rich2K, dreamweaver does output invalid code, and horrible code layouts along with that. The <font> tag is deprecated; yet, Dreamweaver MX does allow it, and even generates it... Rich2k 08-27-2003, 11:58 AM Only if you use Dreamweaver incorrectly. Next time you open dreamweaver, in the properties panel click on the little 'A' icon, which means toggle between CSS and HTML mode. HTML mode uses <font> CSS mode uses CSS. Of course it allows the <font> tag as one of the great features of Dreamweave unlike some earlier versions of Frontpage is that it DOESN'T re-write your existing code. Although if you use the validate markup report it would soon tell you. Define what you mean by horrible code layouts? It's code formatting and layouts are fine and XHTML compliant for me. Again it's all down to using the software correctly. Daijoubu 08-27-2003, 08:23 PM I had a DW generated html with over 150kb of useless <font face="*insert random names*"></font> junk Don't ask me how it happened :eek: I don't like WYSINWYG editor anyway :p A good IDE and few browsers to preview is all needed splushosting 08-27-2003, 11:13 PM While I agree that unless designers use standards as much as possible we will always have problems with browser incompatibilities and inconsistencies, I also think that sometimes there needs to be a trade off. Obviously the original poster is concerned with page load times and is looking to squeeze out as much time as possible. Therefore using things like eliminating quotes and such, while notbeing proper html, will help a little with larger pages on a large site. <<Signature to be setup in your profile>> FleZ 08-27-2003, 11:53 PM Originally posted by Daijoubu I had a DW generated html with over 150kb of useless <font face="*insert random names*"></font> junk Don't ask me how it happened :eek: I don't like WYSINWYG editor anyway :p A good IDE and few browsers to preview is all needed As Rich said twice or even more, it's not the program the problem, it's the user. (I said it in another way than Rich). illusionist 08-28-2003, 06:39 PM Thanx for the info, but i use dreamweaver 4 (i have mx too). I see alot of unwanted codes, when i design a page through it and this is one of the reason for the page sizes to go up. Is there something else i could use that is good, rather than dw? As said earlier i have over 2000 pages and the site gets update frequently so check the codes page by page is "not an option". Ionsurge 08-29-2003, 02:50 AM Rich2K, I wasn't aware of that, kudos to you. Although I am still happy with TopStyle Pro 3.10 Illusionist, if you are not up to altering the code, even if temporarily putting the site down while performing maintainence, then you could only reduce the quality of your images, which is not always a good thing. :) Daijoubu 08-29-2003, 12:06 PM Not neccesery reducing quality But 8bits png is sometimes smaller than gif or reducing the color palette to minimum ie: You pictures have 27 colors, using a 256colors palette would be a waste of space, lowering it to 32 would be perfect :) bedlam 08-29-2003, 01:41 PM The issue of Dreamweaver creating bad HTML and the problem of too-large HTML pages can be solved the same way: CSS I'm not one of those anti-table fanatics who'll tell you that there's nothing CSS can't do, but most of the excess stuff that DW generates is formatting stuff like the FONT monster-tag... Keep away from the formatting stuff except for H and P tags, keep away from the font-sizes, keep away from the table-formatting stuff, and your pages will a) be smaller, and b) validate. To the OP, you may want to change a few pages at a time once you develop a good stylesheet, or switch pages that get updated. I don't envy you the work though... :D B Ionsurge 08-30-2003, 07:05 AM Bedlam, I think you missed the point where Illusionist said s/he was not prepared to alter the code. In regards to the PNG issue, IE has some issues with the PNG format, so it may cause slight colour related inconsistencies. illusionist 08-30-2003, 07:24 AM Thats it!!! Im learning css, i have the vtc training thingie!!!:D bedlam 08-30-2003, 02:28 PM Ionsurge, I see I didn't say it very well: I was mainly thinking of the creation of new pages. But, as long as the bulk of the pages on the site do cause a problem with bandwidth or space, I think there's not much of an alternative. Espically if it's a bandwidth issue, I think the solution must involve recoding the more popular pages at least... B Rich2k 09-01-2003, 05:19 AM Originally posted by Ionsurge Rich2K, I wasn't aware of that, kudos to you. Thanks :) That's what happens when you have to learn the entire program inside out to pass and exam in it. Can't tell you whats in the exam though as you have to sign an NDA. However it's a lot harder than you think ;) Ionsurge 09-01-2003, 12:25 PM I dread to have to do that, mind it does up my impression on Dreamweaver MX. If I get asked to do something in Softimage XSI, Maya, 3DSMax, Lightwave, Rhino, or Houdini Master 6, I could answer, but not Dreamweaver MX I guess. :) |