When we talk about source code and the file which contains the code like CSS, HTML, JavaScript and we also talk about performance of a web site or application, what is the differences between these terms?
- Optimization
- Compression
- Minification
- Tidying
- Concatenation
Mike Partridge
6,7171 gold badge28 silver badges42 bronze badges
asked Oct 11, 2011 at 16:38
1 Answer 1
- Optimization - general term meaning any of the following:
- Compression - fewer bytes through algorithmic means
- Minification - fewer bytes by using shorter syntax with the same meaning
- Tidying - removing code that doesn't do anything and removing redundant code
- Concatenation - delivering all the data in one request rather than multiple requests
answered Oct 11, 2011 at 16:45
-
+1 Thanks can you give a simple example of each using a simple css code?Jitendra Vyas– Jitendra Vyas2011年10月11日 16:48:09 +00:00Commented Oct 11, 2011 at 16:48
-
Is Minification the same alpha conversion? (lambda calculus). Also code that doesnt do anything is also known as "dead code"Raynos– Raynos2011年10月11日 16:49:44 +00:00Commented Oct 11, 2011 at 16:49
-
@Raynos: 'DeadCode' is covered under Tidying. Minification would be replacing
while(true)
withfor(;;)
(both loop forever but the second one is 4 bytes shorter).Loki Astari– Loki Astari2011年10月11日 17:35:25 +00:00Commented Oct 11, 2011 at 17:35 -
1@Jitendra: Compression - gzipped. Minification - code rewritten to be less characters but still work. Internal variables might be changed from "theXYCoordinate" to just "a". Tidying - can't get simpler than what Scott said. Concatenation - you might combine jquery, jquery ui, and your own JS all into one file. It's all the same code but 1 HTTP Request instead of 3.AndyMcKenna– AndyMcKenna2011年10月11日 18:28:58 +00:00Commented Oct 11, 2011 at 18:28
-
@Andy - +1 How to do these things with any website I develop.Jitendra Vyas– Jitendra Vyas2011年10月11日 18:40:04 +00:00Commented Oct 11, 2011 at 18:40
Explore related questions
See similar questions with these tags.
default