WEBVTT

00:00:00.000 --> 00:00:06.000
Why does production website code look squashed together?

00:00:06.000 --> 00:00:13.000
It trims the code while keeping its intended behaviour.

00:00:13.000 --> 00:00:18.000
Understand the smaller code file.
6 minification basics.

00:00:18.000 --> 00:00:30.000
Start with the source file
Developers write readable code with spacing and useful comments.
Readable source · Useful formatting · Editable project

00:00:30.000 --> 00:00:42.000
Remove unnecessary characters
A minifier can strip whitespace and other non-essential text.
Less whitespace · Removed comments · Smaller output

00:00:42.000 --> 00:00:54.000
Preserve the behaviour
The built file should still perform its intended task.
Same intended result · Valid output · Working interaction

00:00:54.000 --> 00:01:06.000
Compression is another step
Minification and transfer compression can work together.
Smaller source text · Compressed transfer · Separate techniques

00:01:06.000 --> 00:01:18.000
Keep the original source
Future maintenance should use the editable project files.
Original project · Version history · Rebuild process

00:01:18.000 --> 00:01:30.000
Test the production build
Check the actual optimised files used by visitors.
Important pages · Browser errors · Essential interactions

00:01:30.000 --> 00:01:39.000
Your checklist
Start with the source file · Remove unnecessary characters · Preserve the behaviour · Compression is another step · Keep the original source · Test the production build

00:01:39.000 --> 00:01:47.000
Keep the editable source and test the built result.
jerseyweb.je
