News for hackers. Stuff that matters.
Re:Lyft for Work by mootothemax on Friday December 05, 2014 @06:14AM (#8703904)
Looks like they're following Google's guidelines[1], and passing an "_escaped_fragment_" parameter returns a pre-rendered view.

Compare the source of the original page with this one:

https://www.lyft.com/work?_escaped_fragment_=

Implementing this is thankfully not too tricky.

Whilst there are various SaaS providers that will take care of it for you, it's relatively simple to add a rule that checks for the parameter, loads up the requested page in PhantomJS, and returns the rendered HTML.

Add a bit of caching, and the job's done.

[1] https://support.google.com/webmasters/answer/174992?hl=en

Re:Lyft for Work by xyby on Friday December 05, 2014 @06:46AM (#8704015)

    https://www.lyft.com/work?_escaped_fragment_=
Interesting. How did they make google check for that url in the first place? Via a sitemap or something?
Re:Lyft for Work by mootothemax on Friday December 05, 2014 @07:37AM (#8704177)
Interesting. How did they make google check for that url in the first place? Via a sitemap or something?

By including the following meta tag:

  <meta name="fragment" content="!">
Google provide their own guide for this:

https://support.google.com/webmasters/answer/174992?hl=en

Re:Lyft for Work by xyby on Friday December 05, 2014 @09:22AM (#8704585)
Wow. That's nice. I wonder whats better: deliver the content via a <noscript> element or via the fragment url.