MPS to support App Shell?

9 views
Skip to first unread message

mick...@kikuta2008.com

unread,
Aug 31, 2016, 1:58:31 AM8/31/16
to mod-pagespeed-discuss
Hi guys,

A thought just occurred to me, and I figured I must drop it here -- why not create an app shell support through MPS?

In short, if you could identify what is the template (the google SE does), you can separate the content from the template and cache the template separately.

More over, when requesting the content through JS, you can strip out the template and deliver an EXTREMELY small response, so the flow would goes as follows:
- user request a page
- service workers will identify the fetch and reply with the template html from the cache.
- the template html will include JS code that will request the content from the server.
- the server will strip out the template and deliver just the content.

By that we can bring balance to the force and peace too to galaxy :-)
What say you?

mick...@kikuta2008.com

unread,
Aug 31, 2016, 3:51:31 AM8/31/16
to mod-pagespeed-discuss
Thinking about it, it can work in a very simple way, similar to the way dedup_inlined_images works.

That is:
- identify repeated blocks of html
- save those blocks on the local browser cache.
- when serving the page, replace those blocks with JS code requesting to load the html blocks from the app cache.

It's not exactly app shell, but it will give a very similar effect, it's simpler to implement in a generic way and can drop big chunks of html out of the pages.

mick...@kikuta2008.com

unread,
Aug 31, 2016, 3:59:37 AM8/31/16
to mod-pagespeed-discuss
You can create a map for all tags on the page (say md5 of the tag) and count on different urls how many times it appears. If it's appearing "often" (and for us, even in 1% of the pages is excellent) it can be cached, striped out and be requested by js code from the cache.

Of course the bigger the tag (including other repeated tags), the better it is to strip it out.

We would very much like to hear your thoughts on this, as we believe it can decrease page size on our case significantly.

On Wednesday, August 31, 2016 at 8:58:31 AM UTC+3, mick...@kikuta2008.com wrote:

mick...@kikuta2008.com

unread,
Sep 13, 2016, 4:29:44 AM9/13/16
to mod-pagespeed-discuss
So... I was sure you guys will love this. Any comments?


On Wednesday, August 31, 2016 at 8:58:31 AM UTC+3, mick...@kikuta2008.com wrote:

Joshua Marantz

unread,
Sep 16, 2016, 9:38:38 AM9/16/16
to mod-pagespeed-discuss
Sorry about the delay -- I thought I had responded to this.  There used to be a google-hosted version of pagespeed (PSS), and that had such a feature.  The feature was described in this blog post:


That version did not use app-shell, it instead relied on PSS proxies and their caches being very close to clients (compared with the origin).  It did produce amazing speed-ups, but it's hard to use because you had to configure the system to identify the panels in your site that need to be punched out of the cache and served dynamically. One surviving feature from that project is defer_javascript.

The emphasis on the team now is on optimizations that can be deployed automaticaly on all sites with little or no risk of breaking the site.

I think a JS framework that helps you cache templates in local-storage and thereafter send only the new bits for each page from the server sounds a lot like Progressive Web Apps, which has a huge amount of attention now.  Have you checked out frameworks like Polymer, React, & Angular?

-Josh


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/59a841ae-f0c9-4e2e-b0f5-d0c888c2f931%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

mick...@kikuta2008.com

unread,
Sep 27, 2016, 8:43:21 AM9/27/16
to mod-pagespeed-discuss
Apologies for not replaying earlier. I never got a notification on this one. I guess I forgot to check the notify me when wrote this.

Anyway, I thought there might be a feasible way to implement the identification of repeated html within the page and even between pages. That can help many sites that can not change their architecture in a night.

We do have a new version we are working on though, so your comments came right in time :-D
Of the below list, which would you recommend?

Thanks for your feedback!
Mickey.


On Wednesday, August 31, 2016 at 8:58:31 AM UTC+3, mick...@kikuta2008.com wrote:
Reply all
Reply to author
Forward
0 new messages