mozilla / wadi

experimental project tracking for the Web App Developer Initiative
https://wiki.mozilla.org/Apps
4 stars 3 forks source link

write a WordPress plugin for cacheing with service workers #16

Closed wfwalker closed 8 years ago

wfwalker commented 8 years ago

it could cache CSS, fonts, logos it could try to cache home page and most popular blog posts? it could cache the pages as you visit them for review later?

mykmelez commented 8 years ago

There are gazillions of Wordpress blogs, and many popular websites use Wordpress as a CMS, so a plugin for Wordpress could potentially have a big impact on the amount of web content being offlined.

One area where I want more clarity is how caching would work best for blogs. @wfwalker notes that the plugin could cache a variety of assets, including "chrome" assets like CSS files, fonts, and logo images, as well as content like the home page and popular blog posts. But it isn't actually clear how caching that content translates into a better experience for users, especially since users often consume blog posts like they consume news articles (which, indeed, the blog posts may represent): i.e. once. So caching a blog post when the user reads it is too late.

Perhaps it would make sense to auto-cache all the current content for a site when a user first visits the site, so it's still available even if the user's device gets disconnected. But that could be a lot of content, and the user may have no intention of browsing most of it.

Perhaps this is a case where a manual step is advisable: a button on the site that represents something like "I'm going to go offline (to travel, or conserve battery, etc.), and I'd like to read this site while I'm offline, so offline all the current content." Or perhaps that button could be per-post, unsure. Or maybe it could be automatic, but limit the amount of content it caches (or somehow smartly detect the kinds of posts the user is likely to want to read next, perhaps caching one next story at a time, for users on spotty connections).

This feels like it both 1. has a ton of theoretical potential, and 2. is ill-defined. It needs some user research / product managerial insight to identify the value it can add and the best way to add it.

dbialer commented 8 years ago
  1. According to http://w3techs.com/, 24.9% of all websites use Wordpress.
  2. I will help define this. There is an opportunity here for both push notifications (notify user when there is a new post), and offline.
darkwing commented 8 years ago

This would be an awesome, awesome plugin! I have been working on adding a service worker to my site, only need a good cache-busting strategy. If 25% of the web uses WordPress, the web could get a whooooole lot faster.

wfwalker commented 8 years ago

maybe we could start with hacks blog as a first guinea pig, they use word press

delapuente commented 8 years ago

Apart from caching the chrome assets, and this read later feature @mykmelez was suggesting (which remind me the proposal for MDN #21 and the Create a book feature from Wikipedia), the service worker could read the content and automatically fetch some links related. For instance, the worker could be configured to follow and cache two levels of links.

TimAbraldes commented 8 years ago

+1 to this. It feels like we should do this on the way to accomplishing #17.

From the discussion above, I envision the milestones for this project as something like:

  1. Create a content-caching WordPress plugin used by hacks.mozilla.org
  2. Release plugin into the WordPress plugin ecosystem for use by other WordPress sites
  3. Extend plugin to include notifications via Push (testing on hacks.mozilla.org)

One thing that's kind of interesting to note is that it doesn't feel like this move targets mobile app developers: People who are already using WordPress will be able to benefit from the plugin, and people who are already writing web apps will likely be the ones checking out the technology and incorporating these ideas into their projects. Mobile app developers may or may not notice that a quarter of web sites suddenly seem faster than they used to.

wfwalker commented 8 years ago
darkwing commented 8 years ago

I'd also be comfortable with being a crash test dummy.

digitarald commented 8 years ago

I pinged my friends at Automattic who just relaunched wordpress.com: https://developer.wordpress.com/2015/11/23/the-story-behind-the-new-wordpress-com/

brendandahl commented 8 years ago

+1 Seems this could have a large reach

marco-c commented 8 years ago

+1

darkwing commented 8 years ago

+1, this could have a giant impact on web speed and offline reading!

rorito commented 8 years ago

+1

delapuente commented 8 years ago

+1 The CMS user is someone we cannot oversee as they hold almost the 50% of the content in the Web. It's not only Wordpress but Magento, Prestashop and Blogger. Providing offline capabilities to these CMS we cover the most representative portion of the Content Management market and we can impulse the creation of new plugins for the rest of CMS.

gemmadlou commented 8 years ago

+1