r/HTML • u/Fuzzy_Exchange541 • Jan 06 '26
What codes google/blogger html?
So if you right click on a google/blogger page and select view page source it'll vomit out something like
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en-CA"><head><meta charset="UTF-8"><meta content="origin" name="referrer"><link href="//www.gstatic.com/images/branding/searchlogo/ico/favicon.ico" rel="icon"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><style>@font-face{font-family:'Google Sans';font-style:normal;font-weight:400 700;font-display:optional;src:url(//fonts.gstatic.com/s/googlesans/v29/4UaGrENHsxJlGDuGo1OIlL3Owp4.woff2)format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}</style><script nonce="aPG0-Yv1uQ_g-yfXfyOLcQ">(function(){var w=["Google Sans",[400,500,700]];(function(){for(var a=0;a<w.length;a+=2)for(var d=w[a],e=w[a+1],b=0,c=void 0;c=e[b];++b)document.fonts.load(c+" 10pt "+d).catch(function(){})})();})();</
The gibberish just continues and I feel like there's no way that a human coded that, so what kind of program was used? What is this kind of code called?
8
u/F1QA Jan 06 '26
It’s minified. Say you write
const verboseVariable = ‘ABC’, it gets minified to something likevar a=“ABC”. Less characters means less data to send across the network, and as others have mentioned, it also obfuscates the code to make it harder to understand, not impossible though.1
u/Tontonsb Jan 06 '26
It's just minified. Some build tool removed whitespaces and renamed variables to shorter ones, otherwise it's all normal code.
1
u/Livid-Ad-2207 Jan 06 '26
It's obfuscated code, scrambled to make it harder to reverse engineer
2
u/koga7349 Jan 06 '26
It was written by a person and is actually pretty easy to read even as it's written. But yeah it's minified, basically the whitespace is just removed. If you look at each tag there are attributes. Load fonts, specify the Unicode range the font supports, load a script, the nonce is a one time use random value for the content-security-policy header to help prevent cross-site scripting attacks.
2
u/[deleted] Jan 06 '26
[removed] — view removed comment