alexkras.com

  • Home
  • YouTube
  • Tech News TLDR
  • Top Posts
  • Resume
    • Projects
  • Contact
    • About

Archives for November 2016

Simple RSS Reader in 85 Lines of PHP

November 30, 2016 by Alex Kras 2 Comments

Share this:

I wanted to create a simple RSS reader for myself. All I wanted to see was some top headline from top news site (according to Google it’s BBC, CNN and Fox News). No images, no fluff, just a headline and a link. I settled on 7 headline, which provided me a good balance between too much and too little data.

You can check it out at https://www.alexkras.com/eznews/.

My first intent was to just use JavaScript, however, I run into an issue with RSS feeds preventing cross-origin HTTP request (CORS).


I then decided to use a back end technology of sorts.

Even though I love Python and Node, they are both not very easy to deploy. I wanted something quick that I can deploy on my own server. Since I am already running WordPress , it was VERY easy to create a simple PHP script.

All I had to do is:

  1. Create a folder
  2. Add a simple PHP file. You can see my implementation here: https://github.com/akras14/eznews

It works great. Mobile Friendly. Blazing fast. No large JavaScript files to download.

Here is the core functionality:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function getFreshContent() {
    $html = "";
    $newsSource = array(
        array(
            "title" => "BBC",
            "url" => "http://feeds.bbci.co.uk/news/world/rss.xml"
        ),
        array(
            "title" => "CNN",
            "url" => "http://rss.cnn.com/rss/cnn_latest.rss"
        ),
        array(
            "title" => "Fox News",
            "url" => "http://feeds.foxnews.com/foxnews/latest"
        )
    );
    function getFeed($url){
        $rss = simplexml_load_file($url);
        $count = 0;
        $html .= '<ul>';
        foreach($rss->channel->item as$item) {
            $count++;
            if($count > 7){
                break;
            }
            $html .= '<li><a href="'.htmlspecialchars($mitem->link).'">'.htmlspecialchars($item->title).'</a></li>';
        }
        $html .= '</ul>';
        return $html;
    }
    foreach($newsSource as $source) {
        $html .= '<h2>'.$source["title"].'</h2>';
        $html .= getFeed($source["url"]);
    }
    return $html;
}
 

I’ve added Bootstrap via CDN to make it look prettier, and since it is coming from CDN, it has a minor performance hit.

The only issue with PHP, is that it did not offer an easy way to cache data between various requests. Forcing me to hit RSS feed every time I wanted to render the page. This would be fine, if I was the only one consuming that page, but since I was planning to host it live on the internet, I wanted to come up with a more robust solution.

Luckily, David Walsh came up with a simple solution allowing me to cache my RSS request in a file. I am caching my requests for 5 minutes, meaning I will hit RSS urls at most 12 times per hour.

So there you have it, a simple RSS reader in 85 lines of PHP.


Please Share:

Wanna see my pretty face and hear me ramble? Check out my YouTube channel 🙂

P.S. Check out Disrupted: My Misadventure in the Start-Up Bubble by Dan Lyons a co-producer and writer for the HBO series Silicon Valley (sponsored).


P.P.S. Let's connect on Twitter, Facebook or LinkedIn. You can also get updates via RSS Feed or the Email Form Bellow.
Follow @akras14

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

You may also like:
Share this:

Filed Under: PHP Tagged With: PHP

Chrome Dev Summit 2016 Highlights

November 22, 2016 by Alex Kras Leave a Comment

Share this:

Originally posted on http://www.apixio.com/technical-post/notes-from-the-2016-chrome-dev-summit/

Two weeks ago I got to attend the Chrome Dev Summit, an annual two-day conference
hosted by Google where they announced latest developments relevant to the web
technology. Here are my full notes from this conference. Since there was so
much information presented, I decided to organize it by subject, instead of
chronological order of talks presented.

You can watch all of the recorded talks on their YouTube Channel.


Statistics and Charts

  • Over 2 Billion Chrome Browsers worldwide across desktop and mobile
  • 53% of users say they will leave a site if it’s not loaded in 3 seconds or less
  • Mobile Stats
    • 19 seconds – average mobile page load time
    • 77% of mobile sites take 10+ seconds to load
    • 214 server requests per mobile web page
  • Housing.com reports user acquisition costs – $3.75 mobile install vs $0.07 Progressive Web App

The mobile web is no longer a subset of the web. It is the web. @samccone #ChromeDevSummit pic.twitter.com/i6LjPYKxHE

— Sam Richard (@Snugug) November 11, 2016

Progressive Web App

When I attended Chrome Dev Summit for the first time in 2014, my key complain
was “this is great, but all of the talks are about the mobile web.” This year,
Google pushed to get rid of this mentality, by calling everything (mobile and
desktop) a Progressive Web App.

Progressive Web App is a newish term, that according to Mozilla Developer
Network (MDN)
means:

  • Discoverable
  • Network Independent (Even offline)
  • Responsive
  • Installable
  • Works for every browser
  • Safe
  • Linkable
  • Re-engageable

Progressive Web Apps as a term is new but the concept has been around for a very long time. Look at HTA #chromedevsummit @patrickkettner

— Abraham Williams (@abraham) November 12, 2016

Progressive Web Apps takeaways

  • Progressive Web App != Single Page Application
  • Progressive Web Apps = Smaller user acquisition funnel and faster updates (no need to wait for the App Store)
  • Older technology can be leveraged to provide Progressive Web App experience on all platforms today. If you are interested in supporting various platforms (including Mobile Safari) I highly recommend watching a talk by Patrick Kettner, Edge PM, Microsoft – The “Progressive” in Progressive Web Apps

Tech

Service Workers

Service Workers (not to be confused with Web Workers) are a big deal. MDN
defines Service Workers as follows
:

Service workers essentially act as proxy servers that sit between web
applications, and the browser and network (when available). They are intended
to (among other things) enable the creation of effective offline experiences,
intercepting network requests and taking appropriate action based on whether
the network is available and updated assets reside on the server. They will
also allow access to push notifications and background sync APIs.


I first learned of Service Workers when I attended Chrome Dev Summit in 2014.
At the time the support was limited to the latest Chrome. Things have improved
since then, with Chrome, Firefox and Opera having a full support, and Edge
actively working to add support.

Safari is the only browser without indication of planning to support Service
Worker, with only Mobile Safari being a big deal, since Desktop users have
other options.

"Hundreds of millions of pages are loaded from ServiceWorker per day in Chrome" #ChromeDevSummit

— Eric Lawrence (@ericlaw) November 11, 2016

Service Worker takeaways

  • Service Worker Precipices
  • Offline Google Analytics Library – Pushes Events after user gets back online
  • Good library to get started with Service Workers – sw-precache
  • Live coding session adding Service Worker to a page

Web Assembly

  • Latest Web Assembly info and step by step guide can be found at
  • Interesting demo of how Web Assembly can be used today behind a flag (towards the middle of this talk) – Advanced JS performance with V8 and Web Assembly
  • Web Assembly is on by default in early 2017

HTTPS

  • Sites with input fields (password, credit card etc) and no HTTPs are going to get big “Not Secure” warning on 01/2017
  • HTTPs usage report – it’s growing
  • Thanks Let’s Encrypt
  • Service Workers, Push and other APIs are ONLY available over HTTPs
  • Full HTTPs Talk and Slides

ES6+

#chromedevsummit JS Languaje Features pic.twitter.com/CKu0uTM3VB

— Milton Yarleque (@myarleq) November 11, 2016

  • V8 has Great coverage – Chrome and Node.js 7
  • Async/Await available behind –harmony-async-await in Node.js 7 and Canary

Web Manifest

MDN defines Web Manifest as follows:

The web app manifest provides information about an application (such as name,
author, icon, and description) in a text file. The purpose of the manifest is
to install web applications to the homescreen of a device, providing users
with quicker access and a richer experience.

Web Manifest is a must have for any installable (add to home screen etc)
Progressive Web App.

  • Web tool to auto generate Web Manifest file
  • CLI tool to help generate Web Manifest

Polymer

  • Blessed by numerous speakers as one of the few performant frameworks (in addition to preact) that can be used to create Progressive Web Apps
  • Polymer App Toolbox – Collection of components to build Progressive Web Apps
  • polydev – Polymer Chrome Dev tools extension
  • polyperf – Simple web page performance harness

Accelerated Mobile Pages (AMP)

Announced today: AMP can now prewarm caches for onward journeys in all browsers (including Safari!!!) #ChromeDevSummit

— Malte Ubl (@cramforce) November 11, 2016

  • Can help speeding up the initial Progressive Web App load, until Service Worker cache kicks in
  • Allows for a proper AMP to PWA hand off
  • Full Talk – From AMP to PWA – the best of both worlds

Push Notifications

  • Over 500,000 Domains using Push API
  • With Service Worker can push notification, long after a browser tab is closed

Local Storage

  • Use it as local cache to get a huge performance win
  • Full talk dedicated to the subject, with some Browser specific numbers – The State of Storage

Preload

  • You can use <link rel=”preload” (Chrome only) to ask Chrome to pre-fetch some data

Credentials API

  • Proposal to let browser maintain Users being Authenticated with various sites
  • Full talk

Payments API

The Payment Request API gets me so hyped. Imagine what it could do for subscription content! https://t.co/LsoyVKeUXh #ChromeDevSummit pic.twitter.com/RwY4IyscYM

— Rachel🦄Nabors (@rachelnabors) November 10, 2016

  • Proposal to let browser store payment information and simplify payment process
  • Full Talk

Facial Recognition API

  • It’s coming

Canvas Capture API

  • canvas.captureStream available in Firefox now

Firebase

  • Firebase hosting supports HTTP2 out of the box

Houdini

  • New proposal to simplify CSS?
  • Slides

Tools

Chrome Dev Tools

  • Full talk – Debugging The Web
  • Can now debug Node.js code in Dev Tools
  • Highlighting unused CSS
  • Multiple break points in the same line (i.e. Promise chain)
  • Intelligent multi-line entry in Console (line Node console) no more need for Shift+Enter
  • Better call stack

Lighthous

Lighthouse analyzes web apps and web pages, collecting modern performance
metrics and insights on developer best practices.

Cool tool to analyze your website’s performance. Check it out:

Optimization

Takeaways from #ChromeDevSummit: Virtually every speaker has mentioned this and "send less JavaScript." pic.twitter.com/jRo6g8h62h

— Eric Lawrence (@ericlaw) November 11, 2016

Loading your JavaScript bundle over a 2G connection pic.twitter.com/6luaY8lFFX

— Changelog (@changelog) November 11, 2016

  • SHIP LESS JAVASCRIPT
  • Server Side Rendering still outperforms most highly optimized JavaScript Apps
  • TypeScript + Closure Compiler provide type safe minification. a.something()becomes a.b()
  • Only 10% of apps use code splitting
  • Majority of Web Apps use WebPack
  • WebPack supports Code Splitting
  • RAIL Model
    • Response
    • Animation
    • Idle
    • Load
  • RPRL Pattern
    • Push critical resources
    • Render initial route
    • Pre-cache remaining routes
    • Lazy-load remaining routes on demand
  • Preact is blessed as only other (in addition to Polymer) performant enough framework to build Progressive Web Apps

Browser Support

  • Search for bugs across all major browsers
  • Star bugs you care about to move the web forward
  • If you use it, browser will support it!

Apple

On #ChromeDevSummit there are people from Microsoft, Firefox, Opera… but no Apple. Do @Apple remember Job's words: Write amazing Web apps? pic.twitter.com/YqLJgRV1dd

— Valentyn Shybanov (@olostan) November 12, 2016

  • Google, Mozilla, Opera, Samsung, Microsoft came to the Browser Vendor panel, Apple decline to participate
  • To be fair an Engineer from Apple was present at the Summit and made himself available

Microsoft

  • Progressive Web Apps will get automatically ingested into Windows App Store
  • Progressive Web Apps are top priority for MicroSoft for the next year
  • Edge Dev team hired some great people like @auchenberg and @rachelnabors

FireFox

  • Pretty much on board with everything that Google is proposing

Brave

At #chromedevsummit but not on Browser vendor panel — @Brave is too small, apparently, even though they just asked about ads & ad blocking.

— BrendanEich (@BrendanEich) November 12, 2016

  • Brendan Eich was pissed that he wasn’t invited to participate in the Browser Vendor panel 🙂

Devices

Serious #perfmatters talk from @slightlylate #ChromeDevSummit
Key reason mobile phones aren't as fast as computers is heat 🔥

— Nicolás Bevacqua (@nzgb) November 10, 2016

  • GREAT Talk on Mobile Web and the challenges that we are facing – Progressive Performance
  • The $700 iPhone in your pocket is NOT what next billion of people to come online will be using
  • Placing crappy mobile phone on an ice pack improves performance by 15%
  • The reason mobile phones can’t keep up is heat (seriously watch that talk)
  • Current state of Mobile Web is not good. We must put in the work to make it work for the next billion of users

Examples of Progressive Web Apps

Code splitting and preloading for the win @flipcart #ChromeDevSummit pic.twitter.com/niFuiqH4uy

— Alex Kras (@akras14) November 11, 2016

  • Lyft implemented a Web only version of their app, no download required. Think about it. Android Chrome Only –

  • NASA’s was re-implemented to be a Progressive Web App
  • From the The “Progressive” in Progressive Web Apps talk – good example of Progressive Web App that supports wide range of devices, including Mobile Safari
  • Other examples included
    • Flipcart
    • Housing.com
    • Weather Channel
    • Mic
    • Cnet
    • Alibaba
  • Conclusion

    I really enjoyed Chrome Dev Summit, even though it was a long two days.

    It seems that Google is hyper aware of the current web trends. Modern web is
    not ready for the mobile revolution and Google is very interested in changing
    that status quo.

    Even if your current business needs are not affected by the developing mobile
    market, try to keep two things in mind.

    1. Business needs can change, sometimes really fast
    2. There are a number of benefits that Progressive Web Apps could provide for businesses that are not targeting the Mobile web at all (Caching, Push Notifications etc)

    I think the Web will win if we all work together.

    P.S. We are hiring

    Please Share:

    Wanna see my pretty face and hear me ramble? Check out my YouTube channel 🙂

    P.S. Check out Disrupted: My Misadventure in the Start-Up Bubble by Dan Lyons a co-producer and writer for the HBO series Silicon Valley (sponsored).


    P.P.S. Let's connect on Twitter, Facebook or LinkedIn. You can also get updates via RSS Feed or the Email Form Bellow.
    Follow @akras14

    Subscribe to Blog via Email

    Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    You may also like:
    Share this:

    Filed Under: Business, Front End, JavaScript, Software Engineering

    Twitter API Example – Search and Get User Tweets in Python

    November 19, 2016 by Alex Kras 1 Comment

    Share this:

    Last week I wanted to scrape my Tweets for the past few days. It was very easy to do with Python. In this tutorial we will explore:

    • How to install Twitter API library in Python
    • How to set up Twitter API authentication
    • How to Search with Twitter API
    • How to Get User Tweets with Twitter API

    Side note: Python is AWESOME! Reading Automate the Boring Stuff with Python changed my life. Python (with iPython) is my goto language of choice (sorry JavaScript) anytime I want to crunch some data or automate a task.

    Install Python Twitter API Library

    For the purpose of this article, I am assuming you have Python installed and know how to access it from your terminal. All Macs come with Python pre-installed and it can be easily installed on Windows.


    I used a library called Python Twitter which you can be installed via pip install python-twitter.

    Generate Access Token to Authenticate ( aka Login) to Twitter API

    Once this is done you will need to get:

    • Consumer Key (API Key)
    • Consumer Secret (API Secret)
    • Access Token
    • Access Token Secret

    You can get all 4 by heading over to https://apps.twitter.com.

    Once there, sign in with your Twitter account and click on “Create New App” button.

    Fill in required information (note that app name must be unique) and select “Create Your Twitter Application”.

    You will be taken to your application view. There click on “Keys and Access Tokens” tab. Look for section called Token Actions and click on “Create my Access Token”. The page should refresh, and if everything went well you should see both Consumer Key/Secret and Access Token/Secret.

    Search with Twitter API

    Now that the boring part is done, we can do the fun stuff.

    Open up your Python console, by running python in your terminal. I highly recommend using iPython, which is a drop in replacement for Python console, but way better. You can get it via pip install ipython and then running ipython in your terminal.

    In any case, first thing you’ll need to do in your Python terminal is to import python-twitter library via:

    1
    2
    import twitter
     


    Next you’ll need to authenticate with Twitter via the following command, making sure to fill in the Consumer and Token information that you obtained earlier:

    1
    2
    3
    4
    5
    api = twitter.Api(consumer_key='FILL-ME-IN',
      consumer_secret='FILL-ME-IN',
      access_token_key='FILL-ME-IN',
      access_token_secret='FILL-ME-IN')
     

    You can check that you’ve authenticated by running:

    1
    2
    print(api.VerifyCredentials())
     

    Finally the search can be performed via:

    1
    2
    3
    4
    5
    search = api.GetSearch("happy") # Replace happy with your search
    for tweet in search:
        print(tweet.id, tweet.text)
     
     

    Get User Tweets with Twitter API

    python-twitter library has all kinds of helpful methods, which can be seen via help(api). All user tweets are fetched via GetUserTimeline call, you can see all available options via:

    1
    2
    help(api.GetUserTimeline)
     

    Note: If you are using iPython you can simply type in api. and hit tab to get all of the suggestions. Or write api.GetUserTimeline? and hit enter to see all of the supported parameters`

    Twitter API Example

    In my case, I wanted to get the last 10 Tweets for myself. My Twitter username is akras14 (wink wink), so I ran the following:

    1
    2
    t = api.GetUserTimeline(screen_name="akras14", count=10)
     

    This will return a list (a.k.a. Array in JavaScript) of “Status” class, something internal to python-twitter library, where every Status represents a tweet. To quickly see all of the returned data, it can be converted to a regular Dictionary (a.k.a Object in JavaScript).

    The following command uses list comprehension which is just a hipster way of doing a for loop on every Tweet, converting it to a Dictionary via built in “AsDict” method, and storing all of the converted Tweets into a List.

    1
    2
    tweets = [i.AsDict() for i in t]
     

    It’s as simple as that. Now all of the Tweets can be printed out for inspection:

    1
    2
    3
    for t in tweets:
        print(t['id'], t['text'])
     

    Enjoy 🙂

    Please Share:

    Wanna see my pretty face and hear me ramble? Check out my YouTube channel 🙂

    P.S. Check out Disrupted: My Misadventure in the Start-Up Bubble by Dan Lyons a co-producer and writer for the HBO series Silicon Valley (sponsored).


    P.P.S. Let's connect on Twitter, Facebook or LinkedIn. You can also get updates via RSS Feed or the Email Form Bellow.
    Follow @akras14

    Subscribe to Blog via Email

    Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    You may also like:
    Share this:

    Filed Under: Business, Python, Software Engineering, Tools Tagged With: api, example, login, Python, twitter

    Summary of My Meeting with Google AMP Team after “Google may be stealing your mobile traffic” post

    November 3, 2016 by Alex Kras 33 Comments

    Share this:

    Two weeks ago I wrote a blog post with a controversial title Google may be stealing your mobile traffic, where I outlined some criticism of Accelerated Mobile Pages (AMP) project. Shortly after Paul Bakaus (a developer advocate for AMP project) invited me to join him and Malte Ubl (product manager for AMP project) for lunch to further discuss my concerns.
    Update: 2/2/2017 it’s fairly popular to hate on AMP now, but my criticism at the time was one of the first to reach wide audience and AMP team wanted to understand my concerns better.

    @akras14 @rauchg @cramforce @Errol_Flynn_ @benthompson I too thought AMP was fast HTML subset (static check), missed central service connex.

    — BrendanEich (@BrendanEich) November 12, 2016


    My original post was a bit confusing and should have been 2 separate posts. 90% was simply me outlining mistakes that I’ve made implementing AMP on my site. The other 10% I believe to be a valid criticism of the AMP project.

    The Concerns

    There were 2 main concerns that I brought up about the AMP implementation:

    1. Google was caching AMP pages and serving cached version from their search results.
    2. Google provided a tool bar at the top, with a link to the original source, but there was no easy way to copy or click through to that link. This UX was encouraging users to get back to Google search results instead.

    3-close-button

    Web Cache

    The web caching aspect of AMP is clearly documented, but it was something that I completely overlooked.

    When I first heard of AMP I thought of it as a sub-set of HTML with a JavaScript library that will allow to speed up the mobile web.

    Turns out the AMP vision also included a web cache that would allow content providers (Google, Bing, Pinterest, LinkedIn etc) to serve the content much faster.

    Can the cache be optional?

    My first question was if I could get the speed up that AMP provides without participating in the cache aspect. The answer was yes and no.

    Yes. The AMP project is open source and there is nothing stopping anyone from including it in their pages. The only way Google will know to cache the APM page is when non AMP page has a rel="amphtml" link on it, pointing to the AMP version. i.e.

    <link rel="amphtml" href="https://www.example.com/url/to/amp/document.html"/>


    Removing this link will essentially “disable” the AMP cache.

    Another option is to remove the amp tag from the html tag inside of the AMP page.

    1
    2
    3
    4
    <html amp lang="en">
    ...
    </html>
     

    to

    1
    2
    3
    4
    <html>
    ...
    </html>
     

    HTML pages are not valid AMP pages without the amp tag. Therefore removing this tag will prevent the page from being cached.

    No. While you’ll get the optimized page loading that AMP provides, without caching you will not get:

    • AMP icon in Google search.
    • Chance to appear in AMP specific features such as Top Stories Carousel.
    • Content providers (i.e. Google) will not be able to pre-fetch your content. Meaning a delay (comparing to other AMP sites) from when user clicks on your link to when your content is presented in front of them.

    Bottom line: The web cache is the core aspect of AMP project and the benefits of using AMP without cache are greatly reduced.

    Relevant side note: From what I was told, currently the AMP library does not play nice with some other (don’t know the specifics) JavaScript libraries. Make sure to test your use case carefully.

    Fixing the link

    Even though the web cache sounds a bit scary, I can definitely see the benefit that it provides. I probably would have never made such a big deal about the way AMP was working, has the “get the original link” experience been half decent.

    At the very least I want to easily:

    1. Click through to the original article ( not hosted on Google, probably not the AMP version).
    2. Copy the link to the original article, so I can share it through any internet connected device.

    I think I did a decent job communicating this concern to Paul and Malte. They both assured me that they understood the problem and are confident that they can find a solution that will work for everyone.

    That being said, I am not sure if “fixing” the link is their top priority. Personally, I will not feel 100% comfortable with AMP until this issue is resolved.

    In my mind the URL is the cornerstone of the web and it must be cherished and protected.

    WordPress Integration

    A lot of my pain with AMP came not from the AMP project itself, but rather from miss-understanding how AMP plugin for WordPress worked. It acted like a new theme that stripped out almost everything except for the post content from my original theme, removing such things as analytics and comments.

    While I noticed comments being removed, I did not realize it applied to analytics and other scripts. I’ve also made a false assumption that users will have an easy way to get to the “original” version of my post, where they will be able to access all of the removed content.

    As a result of my original post, some Github issues were created for WordPress AMP plugin, therefore things might get better in the future.

    I did bring up the current state of the WordPress AMP plugin and Malte mentioned that WordPress was a partner in the AMP project. I am not sure exactly what “partner” means in this case.

    What was interesting is that Google worked very closely with major publishers, such as BBC and Daily Mail, to make sure that they were happy with the AMP experience. My guess is that the Google team and the WordPress team did not work as closely on the AMP integration, even though Paul and Malte are aware of a number of issues with the WordPress plugin.

    As AMP was gaining steam, more and more small time WordPress publishers (such as myself) enabled AMP support and began participating in the AMP ecosystem. As WordPress AMP pages began showing up in Google search results, a number of confused and upset users (like myself two weeks ago) began to grow, making Google look more evil then they might have actually been.

    I think the big difference here is that the big brands are much less concerned about click through rates to their original content. As long as their analytics and ads work, and their server loads are reduced, they are happy. They know that visitors will remember if they read something on BBC, even if the URL showed up as google.com/something. Little guys like myself don’t have this luxury.

    While WordPress integration is not Google’s responsibility, I think fixing it is very important for the success of the AMP project.

    Fat bar at the top

    Update 01/14/2017 – It is now scrollable on iOS

    I didn’t get to bring up one more concern expressed in my original article. Google presents a thick bar at the top of the AMP view, that has the close (x) button and the (view only) URL of the original source. The bar remains at the top and takes up roughly 10-15% of overall screen.

    I did not bring this up because I forgot :). I can also see it as part of a solution to the link issue. For example the URL can become clickable/copy-able or the bar can contain a button to allow copying the original URL.

    I’ve followed up with Malte via email and he let me know that the bar only stays fixed to the top in mobile browsers, not in the Google native app. Additionally, in Chrome browser it will scroll out of the view as you scroll into content. The same behavior will land in mobile Safari soon, but they are still working out some bugs.

    Conclusion

    I don’t think that Google set out to steal our traffic. In Malte’s own words, from the start Google has been very careful to construct a project in such a way that publishers maintain full control of their content. Stealing content, is exact opposite of what they are trying to achieve.

    At the same time, it is clear to me that AMP is not as decentralized as the original web.

    When I first learned of AMP I assumed it to be a smaller and optimized subset of existing Web. As I learned more about the project, I realized that it was it’s own thing. AMP acts as a new layer created on top of the existing web. It functions similarly, but at the same time creates a number of different paradigms.

    I am keeping my WordPress AMP plugin turned on. Even given all of the concerns with the AMP project and the WordPress AMP plugin, AMP gets one thing right – loads content really fast on mobile devices. For that, a lot of little things can be (temporarily) forgotten.

    At the same time I hope that people who chose to participate in the AMP ecosystem will understand all of the trade-offs involved and get to make an informed decision.

    I would also like to remind that the link concerned can be addressed short term by optimizing AMP view below the fat bar (just like some of the big publishers are doing now).

    Here is the list of optimization suggestions from my initial post:

    1. Make sure your Analytics tracking code is properly installed.
    2. Make sure you have a header that points back to your main site.
    3. If your site has a menu, make sure it is visible in the AMP version.
    4. Make the title of the post clickable, taking the user back to non AMP version of the page.
    5. Make sure your ads and other promotional material is properly integrate into the AMP version.

    Last but not least, I would like to say that the AMP project appears to be in good hands. Both Paul and Malte are very open to constructive criticism and discussing how AMP project can be improved. So much so, that they are willing to take their time to have a lunch with some random guy from the internet.

    While their lunch capacity is probably limited, if you have any feedback on the AMP project please make sure to let them know via GitHub Issues, Stack Overflow, or the AMP mailing list. Updated list of all those links can be found under the Support section of the AMP site.

    Please Share:

    Wanna see my pretty face and hear me ramble? Check out my YouTube channel 🙂

    P.S. Check out Disrupted: My Misadventure in the Start-Up Bubble by Dan Lyons a co-producer and writer for the HBO series Silicon Valley (sponsored).


    P.P.S. Let's connect on Twitter, Facebook or LinkedIn. You can also get updates via RSS Feed or the Email Form Bellow.
    Follow @akras14

    Subscribe to Blog via Email

    Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    You may also like:
    Share this:

    Filed Under: AMP, Business, SEO

    Copyright © 2018 · eleven40 Pro Theme on Genesis Framework · WordPress · Log in