On 08/03/2025 22:56, Greg Wooledge wrote:
On Sat, Mar 08, 2025 at 13:39:18 -0800, Charlie Gibbs wrote:
On Sat Mar  8 13:29:36 2025 debian-u...@howorth.org.uk wrote:
D MacDougall <dmacd...@usc.edu> wrote:
https://duckduckgo.com
That's just a blank page except for a picture of a duck, the word
DuckDuckGo and a search box. No explanation of anything at any length?
Scroll down.
Interesting.  I see *way* more widgets than @howorth is seeing, even
without looking downward.

Across the top, I see the corporate logo, a long entry field for the
search text, a button for chat (with a speech balloon icon next to it),
and a hamburger menu button.

Below that, there's some text in a large font, then a very large button
offering me the opportunity to make DDG my default search engine.

At the bottom of the page are the words "Learn more", and a round button
with a downward-pointing arrow inside it.

If @howorth is running some kind of ad blocker or client-side content
filter that's altering the contents of the page, it must be a *really*
aggressive one.

P.S. looking at the HTML source with Ctrl-U, it's all one line.  Seriously,
who does that?

hobbit:~$ xclip -o | wc
       0    2960   44363

44 kilobytes of HTML/CSS/Javascript, all in one. stupid. line.  Well,
they found a way to make me stop trying to read their page source,
that's for damned sure.

This is a technique called "minification", and is used to make web pages quicker to download. While HTML is not a programming language, it's understood that most HTML code isn't read by humans, it's actually just interpreted by browsers. So a lot of modern web "programming" practice takes some presentable HTML and then performs various transforms in order to reduce the volume of the code without affecting the semantics of it. The most obvious first step is to remove all new lines and all indentation. Other steps you can take are, for example to take all CSS class names or IDs (i.e. things which need to be distinct, but the actual name doesn't matter) and perform a Huffman-like transform on them, so that your most common instances only take up one byte.

It should be understood that "minification" is a sort of "compile" step. If you have some C code, you compile it into an object file which the computer runs. Most people never look at the content of the object file (although it is possible). Instead, the object file is treated as a "write-only" form just for consumption by the computer. In the same way, the web designers will have a more verbose version of the HTML code (one with comments, indentation, meaningful names etc) which they actually work with.


Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to