Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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
1  
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: stackoverflow.com/questions/1747373/php-source-code-whitespace –  Ƭᴇ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
1  
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.