News for hackers. Stuff that matters.
Re:Improving URLs for AMP Pages by tyingq on Tuesday January 09, 2018 @12:25PM (#16107838)
A CDN can inject content, it's often touted as a feature. I'm suspicious because they don't explicitly say the bar is going away.
Re:Improving URLs for AMP Pages by Ajedi32 on Tuesday January 09, 2018 @12:45PM (#16108036)
The OP says they're planning to use the Web Packaging standard. That standard prevents third parties (like Google) from injecting content into the packages by requiring the page to be signed by the original site's private key.

That's how they're able to display the original page's URL in the browser without that practice being extremely misleading.

Re:Improving URLs for AMP Pages by geofft on Tuesday January 09, 2018 @02:50PM (#16109269)
I expect that they'll be providing some tools for people to generate the packages - and that tool can inject the top bar if it wants. It remains to be seen whether Google will provide search-results priority to "AMP" webpackages not generated with Google's tools (I think we'd all hate it if they didn't, but there's no obvious reason that they have to).

In particular, one obvious way to implement this would be to have everyone sign a static webpackage that includes a JS loader that pulls resources from www.google.com/amp/ via XHR/CORS (using ServiceWorkers I guess?), which would only need to be signed once, and send that over to Google. Then the infrastructure continues to work the way AMP does today - you just upload actual AMP-compatible web pages to your actual website, and Google downloads and caches them. Probably this webpackage would just include a single script tag that pulls the loader itself from Google, so that Google can apply updates to the loader without having to bother you again.

The webpackages spec talks more directly about signing the actual data, which would be way better for the web, but it's not obviously better for Google and for publishers already invested in AMP, so we should be cautious that maybe Google does not mean this and means something that's easier for them and retains the lock-in.

Re:Improving URLs for AMP Pages by tyingq on Tuesday January 09, 2018 @12:56PM (#16108144)
Doesn't amp require including amp specific JavaScript? That would jump right past any need for it.

If the bar is going away Google can help themselves by saying that specifically. I'm not the only one that hates that thing.