Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Due to my neat coding style, my pages take up like 30% more space on both my server and the output HTML.
Is there any free extension for Dreamweaver to automatically optimize my pages when uploading them? I mean not only HTML, but also PHP, CSS and JS...
Actually, removing unnecessary tabs, spaces and new lines will just do the trick.

After removing the unnecessary spaces, tabs and new lines from my PHP code, the page loaded three times faster so this is important...

share|improve this question
.... Bro. That's a whole lot of tabs and spaces. A 30% increase? Wow. – Griffin May 29 '15 at 11:52
@Griffin I've had plenty of time to work on my coding style since I asked this question. It used to be a true horror. :/ – Vercas May 30 '15 at 8:27
Wow this was asked 4 years ago. It came up in the active yesterday. – Griffin May 30 '15 at 13:54

You can set it up to remove trailing spaces and tabs on saves (I think that's set by default)

But honestly, you might want to check your server settings or performance...

I have never noticed any change in loading time when I started making better organized code.

And if it would effect loading times that much, then I think that most programmers would also prefer to remove all 'styling' but as a matter of fact, even the best programmers keep the 'styling' so they and others can edit it easily

When you say 30% change in file size do you mean from 10kb to 12kb? because that just doesn't matter

share|improve this answer
I've had a 6,5 KB file and it turned 5 KB after optimizing the PHP only. It loaded 3 times faster, just like I said. But I'll look closer at the settings... – Vercas Apr 12 '11 at 14:19
I'm affraid you either have an incredibly slow connection to your server or the server itself is overloaded? 6,5kb to 5kb should hardly make any noticable difference – HTDutchy Apr 12 '11 at 14:29
First of all, I care about bandwidth a lot. Secondly... It still makes a difference. My pages are HUGE. – Vercas Apr 12 '11 at 14:38
@Vercas - See here for some info on PHP whitespace and what you do and don't have to worry about: – Ƭᴇcʜιᴇ007 Apr 12 '11 at 21:34
There are hundreds of websites on the same server and it's busy most of the times... – Vercas Apr 14 '11 at 16:55

Dreamweaver has it's own tidy tool that works well if you select the "format sounce code" icon which is a paint bucket and click "apply source formatting" this will remove spaces etc and generally tidy the code up.

share|improve this answer
I do not intent do format my code. I want to be able to maintain it. I would like to have my code uploaded formatted. – Vercas Jun 22 '11 at 9:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .