amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Support server-side rendering with shell URL rewriting

Open bjalford opened this issue 9 years ago • 2 comments

We're working on a large UK publisher website and in the prototype stage of a PWA/AMP frontend.

For browsers that don't support service workers the user is currently served the AMP page but we'd like to rewrite to the PWA version using Shell URL Rewriting (https://www.ampproject.org/docs/reference/components/amp-install-serviceworker#shell-url-rewrite).

Currently all of the routing is done on the server. This request is to add support for server-side rendering to Shell URL rewriting.

bjalford avatar Jan 03 '17 11:01 bjalford

Heya!

Super great to hear about your PWAMP efforts :)

I'm not sure I fully understand your request. The way shell URL rewriting works is that on an AMP page with <amp-install-serviceworker>, you can say "if support for Service Worker is not detected client-side, please rewrite all links on the page to go to somelegacyurl.mydomain.com/*". This is done automagically by AMP (based on your configuration), and doesn't require any additional routing on your part.

The only thing you need to do is to have a dedicated URL for your PWA that you can redirect to.

Or did I misunderstand?

pbakaus avatar Jan 03 '17 17:01 pbakaus

Closing with https://github.com/ampproject/amphtml/issues/6853#issuecomment-270169312.

jridgewell avatar Jan 03 '17 18:01 jridgewell