News for hackers. Stuff that matters.
Re:Accelerated Mobile Pages Project by cbowal on Wednesday October 07, 2015 @09:20AM (#10345795)
Re:Accelerated Mobile Pages Project by solidpy on Wednesday October 07, 2015 @01:53PM (#10347654)
No flash, no sidebars, no bottom bars, no comments, a total of 6 requests vs 98. Of course it loads faster. And looks better. This is the way the web should be.
Re:Accelerated Mobile Pages Project by julien on Wednesday October 07, 2015 @02:36PM (#10347982)
Exactly! The WEB! Not yet another format that a small percentage of people will ever use but that everybody else will have to deal with for centuries.
Re:Accelerated Mobile Pages Project by bryanlarsen on Wednesday October 07, 2015 @03:22PM (#10348352)
AMP is a subset of HTML.
Re:Accelerated Mobile Pages Project by cpeterso on Wednesday October 07, 2015 @04:35PM (#10348875)
AMP : HTML :: asm.js : JavaScript?
Re:Accelerated Mobile Pages Project by callumlocke on Thursday October 08, 2015 @06:30AM (#10351826)
That's a good analogy (as long as you mean "HTML" as a banner term to include the HTML spec and associated specs like CSS and Custom Elements [1]).

• AMP is a subset of HTML.

• Any normal HTML engine can, therefore, render any AMP file, without needing to know about the AMP spec.

• It's also possible to make an engine that specialises in rendering AMP (either exclusively, or by switching to a faster mode when it detects the file is just AMP).

• Even in normal HTML engines, AMP files will generally be fast because they avoid 'slow' parts of HTML.

The above points all hold true if you switch the terms to JavaScript and asm.js.

Where the analogy falls short:

• It's easy to write AMP by hand, but asm.js is really only meant to be generated by a compiler.

• Obviously, what is meant by 'fast' is very different in each case. In HTML:AMP, it's about things like reducing network usage, and avoiding layout thrashing by requiring up-front declarations of image dimensions, etc. In JS:asm.js, it's about making compiler optimisations possible so code can execute faster.

Note: AMP does create extra elements, like `<amp-img>`, but these are legit uses of the Custom Elements spec. You can see these elements rendering correctly in Chrome. [2]

[1] http://w3c.github.io/webcomponents/spec/custom/ [2] https://www.ampproject.org/how-it-works/

Re:Accelerated Mobile Pages Project by callahad on Wednesday October 07, 2015 @05:12PM (#10349126)
s/subset of/overlapping set with/

AMPHTML whitelists a handful of HTML tags, but adds a bunch of its own custom elements, like <amp-instagram>, <amp-img>, and <amp-ad> on top. It's neither a subset nor a superset of HTML in the common understanding of those terms.

Re:Accelerated Mobile Pages Project by cramforce on Wednesday October 07, 2015 @06:50PM (#10349682)
Custom elements are a thing in HTML. Using them doesn't make it a superset. http://w3c.github.io/webcomponents/spec/custom/
Re:Accelerated Mobile Pages Project by AdmiralAsshat on Wednesday October 07, 2015 @03:09PM (#10348256)
So the AMP page looks great on a mobile device, but am I the only one that thinks we don't have enough emphasis on the desktop side of "mobile-friendly" styling? I'm reading this page on a 24" monitor, and literally 2/3rds of the page is whitespace. Why isn't more of that space being filled with text?
Re:Accelerated Mobile Pages Project by barrkel on Thursday October 08, 2015 @04:30AM (#10351501)
Are you using a maximized browser on a 24" monitor?

That's not what I do, because it doesn't make sense. Text that takes up the entire width of the monitor is either in an unreadably long line, or in unpleasantly large text. There's only so much margin you can handle on either side of the text before it just looks silly. And I don't think multi-column is the way sites should or are going - it interacts poorly with scrolling.

Thus I don't use maximized browser windows on big monitors. I use tree-style tabs, which uses a bunch of horizontal browser space much more productively than big margins, and I cascade my browser window with other windows so I can easily switch windows using the lower left corner of each window. With it occupying the rightmost and tallest position in the cascade, it is further reduced in horizontal size.

tl;dr: Web browsing, being primarily a text medium, doesn't scale up to wider and wider monitors. So don't make the window so wide.

Re:Accelerated Mobile Pages Project by randomguy7788 on Wednesday October 07, 2015 @05:43PM (#10349325)
hey would you mind linking me? just unsure if you're talking about the landing page or the how-to page i work for the amp team and would love to fix it and give our marketing site some love.
Re:Accelerated Mobile Pages Project by AdmiralAsshat on Wednesday October 07, 2015 @05:57PM (#10349413)
Hi there! Thanks for taking the time to reply. To be clear, I was referring to the AMP version of the Guardian page from the parent comment, so that would probably be outside of your domain to fix.

But to show what I'm talking about, here's how the page looks on my desktop in Chrome:

https://imgur.com/OGy3ltz

Again, that just seems like wasted real-estate.

Re:Accelerated Mobile Pages Project by what_ever on Thursday October 08, 2015 @03:54AM (#10351400)
I actually would prefer the page this way while reading a text article. They want to cut down on the sidebars to make the page faster and only load the main content. And making the content wider just makes more difficult to read. I often lose track of the lines.
Re:Accelerated Mobile Pages Project by randomguy7788 on Wednesday October 07, 2015 @06:53PM (#10349703)
gotcha thanks for clarifying!
Re:Accelerated Mobile Pages Project by cbowal on Wednesday October 07, 2015 @05:56PM (#10349405)
I'm guessing he's talking about The Guardian article linked to above with AMP. The AMP site looks great to me on a large display.
Re:Accelerated Mobile Pages Project by imaginenore on Wednesday October 07, 2015 @04:00PM (#10348608)
Both are very fast, especially on the second load.
Re:Accelerated Mobile Pages Project by djrogers on Wednesday October 07, 2015 @12:57PM (#10347194)
Odd, the second page loaded much faster for me...
Re:Accelerated Mobile Pages Project by on_ on Wednesday October 07, 2015 @12:59PM (#10347210)
Which page did you click first?