David Baron
dbaron.org · Personal blog · on HN since 2008
David Baron is a Mozilla engineer who writes about CSS, browser internals, web standards, and browser privacy.
What HN saysHN commenters link his posts on faster timeouts, the CSS :visited privacy fix, and user style sheets. One says the timeout post solved an animation problem.
40HN people shared it
21linked it in comments
27stories submitted
201story points
10 months agolast shared
2008people per year2026
Most-shared posts
- 1Preventing attacks on a user's history through CSS:visited selectors (2010)12 people · 4 points · first shared 2010 · discussion on HN
- 2Marginal income tax rates for a single California resident (2007)3 people · 56 points · first shared 2008 · 80 comments on HN
- 3Ex-HTML3 people · 48 points · first shared 2009 · 3 comments on HN
- 4How to setTimeout with a delay less than 10ms3 people · 22 points · first shared 2010 · 11 comments on HN
- 5:-moz-any() CSS selector grouping2 people · 18 points · first shared 2010 · 4 comments on HN
- 6Specification style and the future of the Web2 people · 7 points · first shared 2012 · 1 comments on HN
- 7The Age of Bugs (2008)2 people · 2 points · first shared 2013 · discussion on HN
- 8User2 people · first shared 2017
- 9Tying ecosystems through browsers1 people · 20 points · first shared 2015 · 1 comments on HN
- 10Why adding compositing and blending to CSS is harder than it looks1 people · 5 points · first shared 2013 · discussion on HN
- 11Semantic markup, browsers, and identity in the DOM1 people · 3 points · first shared 2020 · discussion on HN
- 12Thoughts on migrating to a secure Web1 people · 2 points · first shared 2015 · discussion on HN
- 13Software engineering, responsibility, and ownership (2017)1 people · 2 points · first shared 2021 · discussion on HN
- 14Why debug builds (and assertions) are important1 people · 2 points · first shared 2014 · discussion on HN
- 15More W3C Controversy (2006)1 people · 1 points · first shared 2010 · discussion on HN
What HN people wrote when they linked it
ck2 · 2010-04-27
OT but my favorite item on his blog is this one http://dbaron.org/log/20100309-faster-timeouts which helped me figure out an animation smoothness problem was with the browser renderer itself and not settimeout specifically
PavlovsCat · 2018-12-12
It should be up to both.
https://dbaron.org/css/user/
I never used them, but Opera had a few preset user stylesheets right there in the "view" menu at the top of the window, that was neat. One was "C64" IIRC. Silly, but neat ^^
https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_she…
If styleesheets could have placeholders for some system colors (maybe even fonts?), that could be something.. turn nightmode on/off, or just generally change colors, and all programs and all websites fade! I would actually love "having to" make 3 stylesheets, one super fancy one, a print stylesheet, and a "system colors" one. Or don't even stop with colors, do it like Magic User Interface on the Amiga, let the user configure how they want all sorts of input and information fields to be formatted and behave... some people want material design (they're wrong of course, but if they must be wrong, I want them to at least be wrong and happy, rather than wrong and unhappy), others want gradients and bevels and shadows everywhere, let everybody set it how they want. Some people want lots of padding, others want tight padding and negative linespacing and tiny fonts, etc.
Awww, now I'm super excited about something that doesn't exist... I can taste it, it would be so awesome! This is the wrong timeline :/
pabs3 · 2022-03-06
For Firefox at least, toggling layout.css.visited_links_enabled should fix this.
An earlier article about the visited CSS issue:
https://dbaron.org/mozilla/visited-privacy
jcranmer · 2019-05-28
This isn't against XHTML 1.1, which was HTML 4.01 shoved into a container of "if it isn't valid XML, display an error page instead;" rather, a lot of the hate is against XHTML 2.0, which decided to rip out HTML features such as forms, frames, most of the old elements such as <b> or <i>, and generally screw compatibility completely.
For a reaction from a browser developer, see https://dbaron.org/log/20090707-ex-html
collinmanderson · 2017-06-14
Yes, browsers used to have "user style sheets" where you insert style rules for how big you wanted text to be, etc.
https://dbaron.org/css/user/
pcwalton · 2017-01-31
> There's a reason Mozilla spent the better part of the decade to come up with a new web renderer.
That had nothing to do with the fact that HTML and CSS are independent.
Tables are way way more complicated than anything in CSS. In fact, tables are unspecified.
This [1] is a work in progress draft and incomplete. You'll be forgiven if your eyes glaze over while reading it.
[1]: https://dbaron.org/css/intrinsic/
gburt · 2016-03-07
>The most intersting fingerprinting vector I found on Tor Browser is getClientRects. Is strange that reading back from a canvas has been prevented but simply asking the browser javascript API how a specific DOM elements has been drawn on the screen has not been prevented or protected in any way.
This isn't as strange as he makes it sound, it is done to prevent the link color history attack [1]. Most of the other CSS properties aren't allowed on :active or :visited modifiers.
[1] http://dbaron.org/mozilla/visited-privacy
bretthopper · 2015-10-27
This has mostly been fixed.
See http://dbaron.org/mozilla/visited-privacy and https://blog.mozilla.org/security/2010/03/31/plugging-the-css-history-…
bzbarsky · 2015-10-27
This used to be possible, but browsers put into place various mitigations: restricting which properties a :visited selector can affect, always computing both the visited and non-visited style to avoid timing attacks, etc. http://dbaron.org/mozilla/visited-privacy has a writeup describing the issues and the solutions that were adopted.
svl · 2015-05-26
That doesn't actually work in pretty much any browser, since it allows for history-mining by a malicious site. :visited styling changed a couple of years ago to only honor color changes, thus preventing most ways of exploiting that issue.
http://dbaron.org/mozilla/visited-privacy is one of the better resources explaining the issue more fully.
I guess you could create the triangle solely with CSS borders, and then style the border-color to be the same color as the background when not :visited
mbrubeck · 2014-06-20
Also cross-origin images, which would affect a large number of sites. And visited link coloring [1], although I supposed the browser could re-render the page without it for screenshot purposes.
1. http://dbaron.org/mozilla/visited-privacy
mauricioc · 2013-02-28
The :visited privacy-related leak is fixed in Firefox, at least: see http://dbaron.org/mozilla/visited-privacy and https://bugzilla.mozilla.org/show_bug.cgi?id=147777 for sources.
tmcdonald · 2011-12-03
I was under the impression that attempts had been made to hide any effects of :visited styles on the accessible DOM to stop this from working. There's a particularly good article on Mozilla's attempts [1], and the relevant bug on Bugzilla. [2]
[1]: http://dbaron.org/mozilla/visited-privacy
[2]: https://bugzilla.mozilla.org/show_bug.cgi?id=147777
roel_v · 2011-07-15
http://dbaron.org/views/taxes-2007.html claims that in California, total marginal tax rate including SS but excluding private health insurance is around 40%, depending on the income. So with some room for retirement and health insurance, yes 50% is about the same or less as in most of Western Europe (the 40% quoted for Germany is only income tax, you'd need to add the mandatory part of the health insurance to it, the local taxes and of course the sales tax which is 19 to 21%; I don't think it ever goes above 10% in California). Oh and 'capital taxes', (not even 'capital gains taxes', which you have to pay too, I'm talking tax on things that you own and on which you've already paid tax before).
Yes California is expensive, tax-wise, but it's not as expensive as most places in Europe. Other places in the US are much cheaper.
robin_reala · 2010-04-30
Mozilla recently added experimental support for -moz-any() which fixes (sort of) Jeff’s third pain point:
http://dbaron.org/log/20100424-any
ndiddy · 2026-01-11
> I learned HTML quite late, when HTML 5 was already all the rage, and I never understood why the more strict rules of XML for HTML never took off. They seem so much saner than whatever soup of special rules and exceptions we currently have.
XHTML came out at a time when Internet Explorer, the most popular browser, was essentially frozen apart from security fixes because Microsoft knew that if the web took off as a viable application platform it would threaten Windows' dominance. XHTML 1.1 Transitional was essentially HTML 4.01 except that if it wasn't also valid XML, the spec required the browser to display a yellow "parsing error" page rather than display the content. This meant that any "working" XHTML site might not display because the page author didn't test in your browser. It also meant that any XHTML site might break at any time because a content writer used a noncompliant browser like IE 6 to write an article, or because the developers missed an edge case that causes invalid syntax.
XHTML 2.0 was a far more radical design. Because IE 6 was frozen, XHTML 2.0 was written with the expectation that no current web browser would implement it, and instead was a ground-up redesign of the web written "the right way" that would eventually entirely replace all existing web browsers. For example, forms were gone, frames were gone, and all presentational elements like <b> and <i> were gone in favor of semantic elements like <strong> and <samp> that made it possible for a page…
yonran · 2021-06-22
“Lots of people don't fill out all the choices” is an important downside. We’ve had Instant Runoff Voting in San Francisco since 2004, and people still don’t fill out all the choices, so their votes are discarded whereas the voters probably would have voted among the final two choices had there been a runoff election. For example, in June 2018 London Breed won the mayoral election against two candidates who were closer aligned politically (Jane Kim and Mark Leno, who were further left) https://dbaron.org/sf-elections-rcv/#%7B%22election%22%3A%2220180627%2… and in Nov 2019 Chesa Boudin won the District Attorney race against 3 candidates who were more moderate https://dbaron.org/sf-elections-rcv/#%7B%22election%22%3A%22CVR_Export… . In both cases, the margin of victory was far more narrow than the number of votes that were exhausted in the final round of voting, so due to insufficient voter education I would consider vote splitting still a significant problem even with IRV. (Another possibility is that the ballots are exhausted by the 3 candidate limit in San Francisco.)
derf_ · 2015-03-17
The space of invertible linear transformations is actually a Riemannian manifold, and in particular a Lie group. Because Lie groups are differentiable, you can defining a geodesic path between two points by minimizing a path integral. That would be the "canonical" [0] path to choose, but there are three problems.
The shortest path depends on your metric. There are straightforward choices for translation (uniform L2 norm) and even scaling (log) and rotation (the amount you rotate by), but when all three are combined in one matrix, units come into play, and things like skew and perspective make them more complicated.
This path is not guaranteed to be unique. Uniqueness fails exactly where two or more geodesics cross. The set of places where this happens is called the "cut locus". The example given elsewhere of a 180 degree rotation is a good illustration of a point in a cut locus.
The set of invertible linear transformations is also not connected. It is partitioned into two components: those with positive determinant and those with negative determinant, and there is no continuously differentiable path from one to the other that does not cross through a matrix with det=0 (i.e., that is not invertible). http://dbaron.org/css/test/2010/transition-negative-determinant has some examples of animations between 2D transformations where the sign of the determinant differs.
As for intent... this is the reason for the rule pornel gives in another comment: if all of your transforms…
paulrouget · 2013-06-19
We are working on multiprocess tabs (again). We paused our effort a couple of years ago for Firefox Desktop. Some other things were more important (we fixed most of our memory issues and improved the global responsiveness of Firefox). And some work was needed before getting multiprocess tabs ready in Firefox Desktop:
- we managed to get multiprocess tabs working for Firefox on Android and for Firefox OS. The inner architecture is now here. Basically, it was easier to start with mobile.
- we worked hard on an even-more threaded architecture in Gecko ("Off-Main-Thread everything"). This makes Firefox much more snappier these days, and this will make things easier for a full multiprocess browser.
So now, with all that done, we are restarting our work on multiprocess tabs on Firefox Desktop.
A multiprocess architecture will probably improve the responsiveness of Firefox, but keep in mind that this is not a magic bullet. Improvements can be made in other areas. Firefox 24 is much more responsive than before and will get more and more snappier in the months to come.
Also - on a related note: "we need a more parallel browser" http://dbaron.org/log/20120827-specification-style
cperciva · 2008-05-30
I'm actually a dual citizen, so I can go up anytime, I believe.
You don't even need to be a dual citizen -- if you're a citizen of the US or Canada, have a job offer, and have reasonable qualifications (a Bachelor's degree in most fields is enough) you can drive up to the border, mention NAFTA, and get a visa on the spot.
are there good reasons for me to go from the bay area to Vancouver
I haven't lived in the bay area, and I don't know your circumstances, so it's hard for me to give a good answer here. I know when Google offered me a job in Mt.View, one of the factors which led me to not accept was that between Vancouver and what I had seen of the bay area, I much preferred Vancouver -- but I grew up in Vancouver, and my tastes have probably been molded by that. If you grew up in a dry, polluted, urban sprawl, you might prefer the bay area.
I imagine I would just be paying more in taxes...
Don't be so certain. Canada has publicly-funded health care, which tends to raise taxes, but it also has much lower per-capita military spending than the US. I can't make much sense out of US income tax forms, but Google found me http://dbaron.org/views/taxes-2007.html; comparing it to an analysis I did last year http://www.daemonology.net/blog/2007-05.html it looks like a single California taxpayer typically pays a marginal tax rate of about 40% of income while a single BC taxpayer typically pays a marginal rate of about 26% of income -- of course, in BC we have provincial and…
bcrypt · 2015-10-27
[edit - just realized this may not answer the question you asked, which is leaks that take advantage of HSTS/HPKP/CSP. hopefully still useful info.]
I may write a blog post later about this, but here are a few that come to mind (only counting things that have demos or have been observed in the wild):
* css-visited browser history sniffing (fixed several years ago): http://dbaron.org/mozilla/visited-privacy
* HSTS unique-subdomain combination supercookies: http://www.radicalresearch.co.uk/lab/hstssupercookies
* lcamtuf's cache timing attack: http://lcamtuf.coredump.cx/cachetime/
* webrtc local ip leak: https://diafygi.github.io/webrtc-ips/
* panopticlick: https://panopticlick.eff.org/
* evercookie: http://samy.pl/evercookie