1,271 karma · joined Sep 17, 2010 (16y ago) · 380 submissions
comment 8y ago · link · parent
Web Packaging was originally proposed in 2015 as a W3C draft (https://www.w3.org/TR/2015/WD-web-packaging-20150115/) and the Signed Exchanges spec as an IETF specification (https://wicg.github.io/webpackage/draft-yasskin-http-origin-...)
There is also an open source project implementing it that anyone can use (https://github.com/ampproject/amppackager).
comment 8y ago · link · parent
> - the original server will not see your download request. This will skew their logs/statistics.
True in the strictest case if that site owner is strictly using http request logs for stats. The site owner must opt-in to this by signing their http exchanges, so this isn't something that will accidentally break someone unknowingly. Site owners have lots of ways of fixing this. More and more these days, logs are being recorded by javascript events anyway.
Note that this is also true of simple browser caching and prefetching. Caching preventing a request and prefetching adding a new one. This is why using server logs to understand audience behavior has limitations.
Also, this is one of the purposes of signed exchanges. In order to prefetch without violating the user's privacy, it's necessary to hide the download request from the origin server until after the user has clicked.
> - someone else will see what you are downloading instead. It's a privacy issue.
The originating server already has numerous ways of knowing all of this. Click tracking redirects, onclick event calls, etc can all register the user's click event off-site. Nearly all analytics tools already do this. The out-linking website owner also already can know the content of the page you will load as they can fetch it themselves. They will have done so in order to serve it as a signed exchange.
> It looks as if Signed HTTP Exchanges are opt-in at the moment.
In order to verify that the content is signed, a publisher must sign it using a private key. There really is no mechanism for this not to be opt-in in the future. The Signed Exchange format differs significantly from TLS connections (https) and there is no path to using the TLS connection to craft a signed exchange. The signed exchange spec in fact goes out of it's way to define a new certificate extension that is mutually exclusive with TLS certificates, so that a site owner must opt-in by way of getting a separate certificate issued.
comment 8y ago · link · parent
There are lots of config options. Here's what I like to use:
// Google Analytics Code.
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};
// https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference
ga('create', 'UA-XXX-XX', 'auto', {
// The default cookie expiration is 2 years. We don't want our cookies
// around that long. We only want just long enough to see analytics on
// repeat visits. Instead, limit to 31 days. Field is in seconds:
// 31 * 24 * 60 * 60 = 2678400
'cookieExpires': 2678400,
// We don't need a cookie to track campaign information, so remove that.
'storeGac': false,
// Anonymize the ip address of the user.
'anonymizeIp': true,
// Always send all data over SSL. Unnecessary, since the site only loads on
// SSL, but defense in depth.
'forceSSL': true});
// Now, record 1 pageview event.
ga('send', 'pageview');comment 8y ago · link · parent
I don't see them truly competing with big budget search engines, but it's probably easy enough to make decent money from keyword ads and if you can sell the brand, you can get enough users to cover a smaller machine footprint and R&D budget that's orders of magnitude smaller.
The results are probably not awful (I don't use it). Result quality gets exponentially more difficult as you try to push that boundary, so you can probably get 80% of the quality there with 1% of the investment. The results may be good enough for plenty of folks, but I highly doubt they will ever be better than the big budget search engines.
comment 8y ago · link · parent
Most date pickers assume that the date is in the near future and that the "day of week" context (ie: tuesday) is useful to the user is selecting the date.
Birthdays are the opposite. They are typically decades in the past, the user doesn't know or care what day of the week they are, and the user knows the numerical date by heart.
The only things I've come up with are:
1) Text entry that attempts to accept different formats and displays the formatted parse of the format next to it. Decent on desktop, text entry on mobile is poor.
2) Big array of Years / Month / Day buttons. The possible range of years is limited (nobody alive was born in year 1200) to a little over 100, so this does scale. User simply needs to tap on the correct button 3 times, which is nice, but the picker takes up sooo much visual space.
comment 8y ago · link · parent
The gas range extender though means that you can take your EV on a road trip and refuel in a matter of minutes. Overnight you charge, but during the day, you fill up along the way.
comment 8y ago · link · parent
At some point those cars can actually be part of the grid's storage capacity, if the infrastructure is built to allow the car to put some of it's capacity back onto the grid during low availability. EV drivers willing to have 20% of their battery be drained when they need to drive can get paid a small amount for leaving their vehicle plugged in while not in use.
comment 8y ago · link · parent
comment 8y ago · link · parent
There is a DC fast-charger at a walgreens not far from where I live that is broken 90% of the time (*not scientific) and always reports available online.
comment 8y ago · link · parent
It also explicitly places an emphasis on placing stations in disadvantaged communities, and focuses on heavy duty vehicles including buses. This is not primarily putting in Tesla charging stations.
comment 8y ago · link · parent
In the small scale, producing infrastructure that can bill your meter going both ways only increases the cost.
But in the large scale, not having to build and maintain more high-power distribution towers across hundreds of miles of difficult to access terrain decreases cost.
comment 8y ago · link · parent
About 1/3 of the time I'm doing this, I end up waiting in line for 20-45 minutes behind someone else anyway before I can start charging. I imagine this will only worsen if more infrastructure isn't built.
My wife and I have 2 vehicles, and only one is EV largely because of this issue. There are too many places I can't go with an EV without significant risk of being stranded. Stranded in this case may mean waiting 4 hours to charge up at the more common Level-2 chargers.
comment 8y ago · link · parent
> The studies you cite are nice and all, but the first two are for studies that measured outcomes after 6-8 weeks. If you assume an average lifespan of 70 years, the longest study represented ~1/450th of a human lifespan. And, as you mention, they only measure what we think are valid indicators, not actual outcomes! And the third study may control for all of the things you mention, but it doesn't control for the other foods the study participants ate!
I fully agree with everything you wrote about the science here.
However, many of the epidemiological studies are over very large populations and time periods, so it's not as though the body of evidence consists of a 6-8 week studies. And honestly the fact that the effects are so strong in such a short period of time strengthen the argument in some ways.
> Really the only piece of information that you need to know regarding red meat is that public health messaging for the last 50 years has been that people should limit red meat intake. And it was successful. According to this, red meat consumption has decreased from 133lbs per person in 1965 to 107lbs per person in 2016. But it is during this exact same time period that the obesity epidemic came into existence. So, perhaps red meat is marginally bad for you, but it is almost certainly not cause of all of the various afflictions that we think are caused in some way by our diets.
Interesting response. I never claimed that meat was bad, only that leafy vegetables were good. I find it almost incredible that your argument against the nutritional value of leafy vegetables is that there aren't enough double blind clinical trials, and then your defense of red meat uses a time correlation that doesn't adjust for any confounding variables at all. It also cites a document from an meat industry group. If you look at USDA numbers (https://www.ers.usda.gov/data-products/food-availability-per...), overall meat consumption has been consistently and slowly rising, however beef is being replaced with chicken, so yes red meat consumption is declining.
comment 8y ago · link · parent
Building a double-blind clinical trial regarding changing people's diets over their lifetime and observing cardiovascular mortality is very hard.
Some clinical studies do exist, but they are usually looking over shorter terms and at heart disease risk factors rather than mortality. These show similar results:
https://www.ncbi.nlm.nih.gov/pubmed/16368299 - Systolic blood pressure decreased from 144 (SE +/- 1.1) to 134 mm Hg (SE +/- 2, P < .001), and diastolic blood pressure decreased from 87.4 (SE +/- 1.2) to 83.4 mm Hg (SE +/- 1.2, P < .05) from tomato extract.
https://www.ncbi.nlm.nih.gov/pubmed/26328470 - In the subgroup of hypertensives, quercetin (onion skin extract) decreased 24 h systolic BP by -3·6 mmHg (P=0·022) when compared with placebo (mean treatment difference, -3·9 mmHg; P=0·049).
Many of the epidemiological studies also adjust for many of the features that you might look for. For example https://academic.oup.com/ije/article/30/1/130/619054 adjusts for "age, randomized treatment, body mass index (BMI), smoking, alcohol intake, physical activity, history of diabetes, history of hypertension, history of high cholesterol, and use of multivitamins" and comes to the same conclusion.
comment 8y ago · link · parent
Some nutrients in some vegetables are diminished by cooking (https://onlinelibrary.wiley.com/doi/full/10.1111/j.1750-3841... for example). Some are also enhanced. For example: lycopene from tomatoes. Overall, it seemed to me that cooking often harms nutrition more than it helps.
comment 8y ago · link · parent
That article mentions 3,000 people per year die from food poisoning, and leafy vegetables are the cause of 1/4 of that, or 750 deaths/year.
However, heart disease alone causes 610,000 deaths per year (https://www.cdc.gov/heartdisease/facts.htm). "Individuals who ate more than 5 servings of fruits and vegetables per had roughly a 20 percent lower risk of coronary heart disease" (https://www.hsph.harvard.edu/nutritionsource/what-should-you...). 20% of 610,000 = 122,000/year. That the heart disease risk reduction is 162x more significant than the food poisoning risk increase, should be more than enough to outweigh the risk of food poisoning.
However, and less clear, there is also evidence that leafy green vegetables protect against diabetes, cancer, dementia, and Alzheimer's.
comment 8y ago · link · parent
Google doesn't start preloading 50 documents, it loads the top result or 2. Even viewing a hundred amp pages in a month is going to cost you less data than one 10kx10k unoptimized image that a publisher decides to load, which happens a lot. Note that AMP optimizes images too taking into account your device resolution, so it's most likely saving you bytes.
comment 8y ago · link · parent
If you do constrain what can run in your preload to avoid these, you end up designing AMP.
comment 8y ago · link · parent
On some wired connections, a network round trip is within user-perceivable 'instant', but for many people on mobile devices, this is very noticeable.
https://hpbn.co/mobile-networks/
Even on the best LTE networks, the 'core network latency' is 40-50ms. 'core network latency' is the latency for getting the packet from the phone to tower to the packet gateway. This is before the packet even goes on the internet. And you need to double it for the round trip. You usually need to double the whole thing for initial DNS lookup.
Best possible latencies for an html page load on excellent LTE connections without prefetching are around 150-200ms. Most users in the world will experience >1s. A United States major city wired connection is not at all representative of what most people experience on a mobile connection.
comment 8y ago · link · parent
> MAX = <reasonably fast load time>
If you define 'reasonably fast' as ~10ms after click, the only possible option is AMP. Even a .txt file will be orders of magnitude slower.Privacy reasons mean that it is basically impossible to load the content from the publisher's server until after the user clicks on the result. If you wait until the user click event to load the content, then there is nothing you can do to avoid a full network round trip.
AMP preloads the minimal content before the click, removing the round-trip. That's the whole magic, and the only way to get the 'instant' load.
There are unavoidable technical requirements to do this:
- Loading from Google's (or link provider X's) servers to preserve privacy.
- Constraining the html so that the load itself can't break privacy or add jank to the search result page.
If you aren't willing to accept these constraints, then you are always going to face a network round-trip in added latency. You can't have all 3 of:
- Zero perceived latency
- Privacy
- Serving from the publisher server
You can only pick 2. AMP forces choosing the first 2 which are what the vast majority of users care about.
Then AMP goes way out of it's way to give publishers back everything they could possibly miss from the 3rd.
comment 9y ago · link · parent
AMP has some severe constraints on javascript, but is pretty non-constrained on HTML and CSS.
Nearly all HTML5 tags and attributes are supported, including non-standard tags like <big>. It even allows super-non-standard tags like "<o:p>" which was part of an old microsoft word export-to-html feature.
Take a look at some of the examples on https://www.ampstart.com/
http://ampproject.org/ is AMP and https://daily.spiegel.de/ is AMP. These look very different.