Top
Best
New

Posted by jgx0 23 hours ago

Example.com just launched the biggest redesign in decades(www.debugbear.com)
336 points | 223 commentspage 2
slipfold 23 hours ago|
Here is some context: https://kimdavies.com/being-exemplary
lxgr 5 hours ago||
> Since most of the traffic to the site is automated it tends not to fetch the Javascript file, reducing overall data requirements.

Well, IATA – give me api.example.com or sniff my user agent and I'll be out of your hair :)

accountrequired 17 hours ago||
This is mine now! <link rel=icon href=data:,>
xigoi 15 hours ago|
I put this on all my websites that don’t have a favicon. I hate the default browser behavior of making a request to /favicon.ico without being asked.
Lightbody 23 hours ago||
I’m curious… who hosts and controls this content? IANA? Never really considered this question until now…
jonah-archive 19 hours ago||
see https://news.ycombinator.com/item?id=42705284 for some historic detail on this
notatoad 21 hours ago||
the 'about' link on example.com sends you here https://www.iana.org/help/example-domains

which does appear to say that yes, IANA hosts this

danhite 18 hours ago||
So they made a prior tweak to reduce fetches of favicon.ico ( by link rel="icon" href="data:," ) but why do they still serve the overlarge meaningless html page to requests for robots.txt ?!

Given that they have gotten spiked by automated requests lately, aka agents, wouldn't this at least be respected by the big players?

Also, as they are using Cloudflare, wouldn't a discussion (or a note from IANA or CF) about how they configured CF request rejection and how one should love CF's flat rate static serving be appropriate?

Am I missing something?

etatester 15 hours ago|
It's quite sad to see incompetence at these levels. This is a static page that loads JS. They even inject styles via JS...
bmarch 14 hours ago||
It’s not incompetence they are intentionally doing as much as possible via javascript to reduce their bandwidth costs. This is because most access to the domain is automated (not using a browser, using curl etc) and doesn’t load javascript
explain 12 hours ago||
They use Cloudflare, which does not charge for bandwidth.
mitxela 6 hours ago||
For free users. But cloudflare picks and chooses its free users.
tty456 17 hours ago||
It's been about 10 years since I last saw this site and accidentally visited it a few days ago and thought "I don't remember it looking like this"
gavino 21 hours ago||
Really funny coincidence, I noticed amazon wasn't loading a couple hours ago. Thought it was my internet so went to example.com to check and noticed the redesign. Figured it was a while ago though.
soltanov 14 hours ago||
Maybe this is the most web-development thing possible: even example.com eventually became a frontend project.
Gualdrapo 23 hours ago|
> Along with introducing multi-language support, the JavaScript code also inserts an SVG book icon.

Wait - using JS for dynamic content is understandable, but why using it for inserting a static SVG?

hiccuphippo 2 hours ago||
I wonder if it's injecting both through javascript to minimize breaking people's tests. Trying to reduce dealing with non-ascii characters and svg tags.
worg 21 hours ago|||
Reducing egress bandwidth, if you have automated clients that don't support JS you save precious bytes from being served by not embedding the SVG, which at example.com scale may be worth it
autoexec 21 hours ago||
Wouldn't removing the pointless SVG image entirely save the most precious bytes from being served no matter if JS (or SVG) is supported or not?
schiffern 19 hours ago||

  >pointless SVG image
Why aren't we all eating inexpensive gruel instead of "pointless" food? Same reason.

It's good to have a little color/flavor/spice in life.

account42 14 hours ago||
Ah yes because bog standard corporate design is how you add color/flavor/spice in life.
schiffern 8 hours ago||
Judging by the reaction to one SVG, it's the most they could do! Can you imagine if it was some art nouveau project instead?

Good for them, and it's still better than nothing. Without it the page would almost looked broken it's so bare.

domh 11 hours ago|||
Why does this site need JS at all? It appears to inject all of the other languages via client side JS. Why can't they all just be served from the server?
afavour 23 hours ago||
Simple answer is the article is wrong, I tried it with disabled JS and still see the SVG.

The whole article reads like something put together with AI, so maybe it’s not too surprising.

zamadatix 22 hours ago|||
I get nothing but a gray page with the following with JS disabled https://i.imgur.com/81aYPeB.png in Firefox via javascript.enabled set to false.
ajcp 22 hours ago|||
You may want to check your settings again or clear you cache as there is definitely a `s.js`[0] file that inserts the `<svg>` element into the HTML DOM[1], which you can see does not contain the element itself.

0

```

var B = document.body, P, p; B.children[0].insertAdjacentHTML("afterend", "<p lang=ar dir=rtl>هذا النطاق مُخصص للاستخدام في أمثلة التوثيق دون الحاجة إلى إذن. هذه ليست خدمة، يُرجى تجنب الاعتماد عليها لأغراض الاختبار والمراقبة.</p><p lang=zh>该域名仅用于文档示例,无需获得许可。这并非一项服务,请勿将其用于测试和监控目的。</p><p lang=fr>L’usage de ce domaine est réservé à des exemples de documentation, sans autorisation préalable. Il ne s’agit pas d’un service ; son utilisation à des fins de test ou de surveillance est à éviter.</p><p lang=ru>Данный домен предназначен для использования в примерах документации без необходимости получения предварительного разрешения. Это не сервис; не рекомендуется его использование для тестирования и мониторинга.</p><p lang=es>Este dominio está destinado al uso en ejemplos de documentación sin necesidad de permiso. Esto no es un servicio; evitar utilizarlo para realizar pruebas o monitoreos.</p><a href=https://iana.org/help/example-domains>Learn more</a>"); P = [...B.querySelectorAll("p")]; P[0].lang = "en"; navigator.languages.some(l => p = P.find(p => p.lang == l.split("-")[0])); p = p || P[0]; B.prepend(p); B.insertAdjacentHTML("afterbegin", '<style>svg{display:block;margin:-2.75em auto 0;opacity:.55}p+p{font-size:.875em;opacity:.6}</style><svg viewBox=0,0,20,20 width=44 height=44 fill=currentColor aria-hidden=true><path fill=none stroke=currentColor stroke-width=1.3 stroke-linejoin=round d="M6 4H3v12q4 0 7 1.5-1-3.5-4-4.5V2q3.5 1 4 3v12.5q3-1.5 7-1.5V4q-4.5 0-7 1"/><g transform=rotate(-6,13.6,8.3)><path id=q d="M11.5 6.6h1.8v1.8l-1 1.6-.6-.3.8-1.3h-1z"/><use href=#q x=2.4 /></g></svg>')

```

1

```

<!doctype html> <html lang=en> <head> <meta charset=utf-8> <link rel=icon href=data:,> <meta name=viewport content="width=device-width,initial-scale=1"> <title>Example Domain</title> <style> html { color-scheme: light dark; background: light-dark(#eee,#222) }

            body {
                font: 16px/1.6 system-ui,sans-serif;
                max-width: 26em;
                margin: auto;
                padding: 25vh 2em 2em;
                text-align: center
            }
        </style>
    </head>
    <body>
        <p>This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes.</p>
        <script src=/s.js></script>
    </body>
</html>

```

notpushkin 15 hours ago||
``` doesn’t work on HN, prepend two spaces to each line to get a code block.

Regardless, it’s a lot of code, so maybe better move it out to a pastebin/gist?

More comments...