WordPress Plugin: WP-Offline
Blogging, Google June 4th, 2007 - 25,291 views
As many of you are already aware, Google announced a new product last week called Google Gears (I wrote an intro to the toolkit a few days ago). After playing around with Gears for a while I realized that I could use it to solve a problem that has bothered me for some time: I can’t read blogs offline! WP-Offline is a WordPress plugin that lets your readers cache your entire blog for offline reading using Google Gears.
I’ve been working feverishly trying to get this thing done as quickly as possible. It’s not quite production ready, but I decided to release what I have now since I’m leaving for a two week vacation tomorrow afternoon. Below you’ll find some installation instructions, and a list of problems that I am aware of, but did not have time to fix (if you find any more problems or bugs, please leave a comment). When I get back I’ll try to address these problems and put together a proper release (if anyone wants to fix these issues while I’m away, you have my blessing).
Installation
- Unzip in your plugins directory.
- Make the manifest.json file writable by the web server, if it’s not already (either chown it to your webserver UID or run chmod a+w manifest.json).
- Open wp-offline.js and edit the first line, setting BLOG_ROOT to the root directory of your blog (with no trailing slash). If your blog is served out of the root directory (i.e. there is no subdirectory) set BLOG_ROOT = ”;
- Add a div with id=”wp-off” in your theme file wherever you want the “Read offline” UI element to show up.
- Enable the plugin on the WordPress admin panel.
- Create a new manifest by going to the “WP-Offline” tab under the “Options” on the admin panel.
Known Problems
- I didn’t have time to work on the UI in Internet Explorer, so for now this is Firefox only (but over 80% of my readers use Firefox, so most of you should be ok). It shouldn’t be hard to tweak the UI code for IE. I think it’s just a CSS problem. I’m almost positive that you’ll need to tweak the UI anyway to work on your blog.
- There’s no way to tell the status of the managed resource store, so you can’t make an accurate progress bar (unless you use a normal resource store and manage it yourself).
- You can’t tell a managed resource store to update a single page, so whenever the manifest file changes the LocalServer will re-request every page (well, it does a HEAD request first, but WordPress doesn’t seem to handle HEAD requests very efficiently).
- The manifest may not be auto-updated at all the right times, I didn’t have time to do the proper research on this… Right now it updates whenever there is a new post, page, or comment (or if a post, page, or comment is edited or deleted). You also can manually update the manifest by clicking on the WP-Offline tab under “Options” on the administrative menu.
- The plugin lacks a proper admin panel. The admin panel should allow you to specify which static files to include in the manifest and when the manifest should be updated, at the very least.
June 4th, 2007 at 6:18 pm
Awesome. Saving your blog right now.
June 4th, 2007 at 6:31 pm
Sweet, let me know how it goes…
June 4th, 2007 at 7:13 pm
Great work Mike. Thanks for letting me beta test it. =) I’ll try to integrate it on my site one of these days.. Have fun on vacation!
June 4th, 2007 at 7:53 pm
Thanks Paul. Another feature I want to add is the ability to limit the number of posts that are cached. For someone like you it’d probably be best not to cache the entire blog since you have only 800 posts…
June 4th, 2007 at 10:07 pm
Awesome stuff! How big is the archive/backup usually? I haven’t had time to test this but rather interested in the size.
Have a good trip!
Dimitry
June 4th, 2007 at 11:37 pm
@Dimitry
The “manifest file” lists around 190 URLs that are being grabbed. That includes posts, pages, categories, and archives, along with other “resources.” I think the biggest variable in terms of bandwidth are probably the number/size of images though. So it would really depend on the site, how many images it has, how many posts there are, etc.
For my site it’s not huge, probably between 2 and 3MB. As the site grows that number will grow, of course. Which is why I’d like to add the ability to limit the age of posts and other resources that are included in the manifest.
June 5th, 2007 at 9:09 am
Very cool Mike. You might consider putting an event handler on the “Read offline” link so you can pick up those requests in Google Analytics (or other analytics tool) and track how often folks are “downloading” your site.
June 5th, 2007 at 9:15 am
That’s an excellent idea Eric. Much better than my current method: grepping for manifest.json in my apache access logs.
June 7th, 2007 at 3:13 pm
Very good Mike. You could forgot warn to PHP5 was required.
If anyone is using PHP4 you could get this message:
“Call to undefined function: file_put_contents()”
June 9th, 2007 at 3:20 am
[...] WP-Offline WordPress Plugin, makes us of Google Gears (tags: googlegears google wordpress plugins offline) [...]
June 9th, 2007 at 6:39 am
[...] WP-Offline,WP的插件永远如此的跟进潮流,这是我看到的第一个非Google产品的Google Gears应用,这个插件让你的Blog站点拥有类似Google Reader那样的Offline按钮,便于访问者在离线状态下也能阅读和回复。 上传;确保manifest.json文件有写权限(chmod a+x);打开wp-offline.js,修改"BLOG_ROOT"部分,写入你的Blog实际地址;在当前的模板中用div "wp-off"来控制实际的表现形式;激活。 Tags: google gears, offline [...]
June 10th, 2007 at 10:06 am
[...] Wordpress Offline - a plugin that allow you to read the blog offline [...]
June 11th, 2007 at 6:08 am
[...] بعنوان CMS در وبلاگ شخصی خود استفاده ميكنند ميتوانند با دريافت اين پلاگين و نصب ان يك ايكون كوچك در گوشه وبلاگ خود نمايش دهند.حالا [...]
June 11th, 2007 at 11:20 am
[...] WordPress Plugin: WP-Offline - I’m Mike WordPress Plugin using Google Gears (tags: blog blogging extension google javascript plugin plugins software googlegears wordpress offline) [...]
June 13th, 2007 at 3:09 am
[...] WP-Offline - Not long ago I posted about the Google Gears browser extension enabling you to read content offline and synch back when you are online, so far you can see this in action with Google Reader. Now there is a Wordpress plugin that allows you to read offline, not just the latest, but all the blog posts from a blog in one click…of course this has nothing to do with synching, it’s more focused on one-click offline reading…I wonder how you delete the data off your PC once you are finished. [...]
June 13th, 2007 at 6:30 pm
[...] WordPress Plugin: WP-Offline Based on Google Gears: plugin that lets your readers cache your entire blog for offline reading (tags: blogreading googlegears wordpress plugin extension offline) [...]
June 16th, 2007 at 4:32 am
Hi,
I’m using WP2.2, installed your plugin as per your instructions. I have Google Gears installed and am using FF (I can see your Read Offline UI).
But when I click on WP-Offline in the Options tab in my admin, all I get is a message saying:
“Updating JSON manifest file…”
But nothing actually seems to be happening. How long should it take? I only have 55 posts, so I’m guessing it should be pretty quick.
Am I missing something? Anyone else having problems?
cheers and thanks
Michelle
PS I’m keen to have people use WP for online documentation. GG and WP-Offline would be one way for them to have offline access to their documents. An export-blog-to-document function would be another way, I know.
June 19th, 2007 at 8:27 am
[...] WP-Offline ,基本上就是WordPress plugin for GoogleGear ,可以讓你的WordPress Blog [...]
June 19th, 2007 at 11:16 am
@Michelle
Sorry for the delayed response — I’ve been on vacation for the past two weeks and just got back last night. The UI is really basic at this point, especially on the administrative side of things. When you click on the “WP-Offline” tab it auto-generates a new manifest, and when you get the message “Updating JSON manifest file…” the file has actually already been created (in retrospect it would have made more sense to say “JSON manifest file has been updated,” or something like that). It only takes a second or so to generate for my blog, but I want to run it on a larger dataset and see how things work.
Now that I’m back I’d like to put some more time into adding a few features to this plugin that should have been in the initial release. I just wanted to get something out before I left on vacation. So keep an eye out for an updated release of this plugin sometime in the near future.
If you have any other issues, or feature requests (or if you get it working) please let me know!
June 24th, 2007 at 12:04 pm
My dream feature, Mike, is to be able to edit posts offline (I am spending way too much time this summer in planes and airports.) But I imagine that is a fair bit more complicated.
June 24th, 2007 at 7:19 pm
That’s actually something I’ve been thinking about working on. I actually don’t think it would be overly difficult to do.
June 26th, 2007 at 1:12 pm
[...] no Bernarbauer que já existe uma extensão para Wordpress que combinada com a disponível para o Firefox permitem que o usuário baixe o conteúdo de blogs [...]
June 29th, 2007 at 11:18 am
[...] WordPress Plugin for Google gears: WP-Offline,由於我的 WP-Offline 的BLOG_ROOT是設在 nfblog下,在我uninstall WP-Offline 後,刪除了 [...]
July 4th, 2007 at 10:01 am
This is a cool plugin, gave you a digg.
July 4th, 2007 at 5:34 pm
Hello
Looks good! Very useful, good stuff. Good resources here. Thanks much!
Bye
July 7th, 2007 at 2:25 pm
Just chased this link down from viewing source on your Pownce article. I have to say, though an interesting idea now that I know what it is, having a blog attempt to use Google Gears when I swing by to read one article is a bit off-putting.
You might want to make this a feature that only engages and requests Google Gears access when a visitor explicitly requests it.
July 7th, 2007 at 2:26 pm
(Also, since I denied access to Google Gears, I now get an error message with every page I visit on your blog.)
July 8th, 2007 at 1:27 pm
Hrm, I think you’re right. I’m going to have to tweak the code so the popup doesn’t show up until someone clicks the link. Even if you accept the link, nothing is actually stored on your computer unless you click the “read offline” link.
The problem is, if you have Gears installed, in order to determine whether you’re reading online or off I need to see if the current page was loaded from cache, and that requires user permission… I’ll have to figure out a workaround.
July 12th, 2007 at 6:32 pm
[...] http://immike.net/blog/2007/06/04/wordpress-plugin-wp-offline/ [...]
July 17th, 2007 at 7:43 pm
[...] Wordpress Offline [...]
August 13th, 2007 at 2:43 pm
[...] Mike, criou e disponibilizou este plugin para o wordpress [...]
August 15th, 2007 at 3:31 pm
[...] enable offline access we used wp-offline plug-in with WordPress. The setup procedure was very easy and straightforward. However, as the [...]
August 15th, 2007 at 3:37 pm
Thanks for great plug-in. Installed it today to our blog and faced some issues with same origin policy. Check out for more details and solution: http://www.delaytolerant.com/
September 30th, 2007 at 2:51 pm
I think I am missing something. I am trying to install this plugin on my site. I have followed your steps above and nothing happens. I am using WP v2.2.3 and trying to test in FF. Am I missing something here? I realize I have not given much information here, but I can’t think of anything else which would be helpful since I am not seeing any results.
Thanks
October 15th, 2007 at 1:11 pm
[...] Visit & Download [...]
October 18th, 2007 at 12:19 am
[...] WP-Offline lets your readers cache your entire blog for offline reading using Google Gears. Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages. [...]
October 18th, 2007 at 5:20 am
[...] WP-Offline permite a los lectores de tu bitácora leer tu blog entero si necesidad de conexión a internet, totalmente offline gracias a Google Gears. [...]
October 18th, 2007 at 1:53 pm
[...] Carrero. Enlace: WP-Offline. Tags: descargas, Google Gears, plugins, wordpressOtras entradas que te pueden [...]
October 18th, 2007 at 4:12 pm
[...] WP-Offline Vía: [...]
October 18th, 2007 at 6:24 pm
[...] - WordPress Plugin: WP-Offline - I’m Mike WP-Offline is a WordPress plugin that lets your readers cache your entire blog for offline reading [...]
October 18th, 2007 at 9:13 pm
[...] la tecnología de Google Gears, WP-Offline es un plugin para WordPress un tanto peculiar que nos permitirá a nosotros y nuestros usuarios [...]
October 19th, 2007 at 3:35 am
[...] Check it out! While looking through the blogosphere we stumbled on an interesting post today.Here’s a quick excerpt [...]
October 19th, 2007 at 1:10 pm
[...] WP-Offline lets your readers cache your entire blog for offline reading using Google Gears. (2 votes, average: 4 out of 5) Loading … Sphere: Related Content [...]
October 19th, 2007 at 5:11 pm
[...] Check it out! While looking through the blogosphere we stumbled on an interesting post today.Here’s a quick excerpt [...]
October 20th, 2007 at 2:43 pm
[...] WP-Offline es un plugin para Wordpress que permite ver nuestro blog de manera offline, para esto utliliza Google Gears, y al mismo modo que lo podemos hacer con Google Reader, nuestros lectores podrán descargar nuestro blog para luego leerlo sin nececidad de estar conectados a internet. [...]
October 21st, 2007 at 4:47 am
[...] gets successfully cached by Google Gears. Now Mike have came up with a new WordPress plugin called WP-Offline which helps to make your blog easily and successfully compatible with Google [...]
October 21st, 2007 at 5:26 pm
[...] WP-Offline lets your readers cache your entire blog for offline reading using Google Gears. I don’t know why anyone would want to cache an entire blog to read it offline… but it’s available. Internal Tags: blogging, plug ins, tags wordpress Like this article? Subscribe to my RSS feed. [...]
October 22nd, 2007 at 11:46 am
[...] WP-Offline makes your readers cache your entire blog for offline condition reading using Google Gears. [...]
October 22nd, 2007 at 4:34 pm
[...] de a construi concret ceva cu Google Gears pentru WordPress. Mike a construit un plugin intitulat WP-Offline (uh, am fi putut ghici acest nume). Urmăriţi cu atenţie instrucţiunile de instalare deoarece [...]
October 24th, 2007 at 6:38 pm
[...] blogs para leerlo offline, ya puedes ofrecer lo mismo en tu blog si usas Wordpress con el plugin WP-Offline. Visto en [...]
October 25th, 2007 at 5:00 pm
[...] Visit & Download [...]
October 27th, 2007 at 11:40 am
[...] gets successfully cached by Google Gears. Now Mike have came up with a new WordPress plugin called WP-Offline which helps to make your blog easily and successfully compatible with Google [...]
October 30th, 2007 at 11:24 am
[...] Google Gears aplicado a Wordpress: WP-Offline. [...]
November 3rd, 2007 at 3:51 am
[...] WordPress Plugin: WP-Offline - I’m Mike [...]
December 2nd, 2007 at 9:27 am
[...] du auch einen Wordpress Blog hast und so ein cooles Feature haben willst schau doch mal hier! Ein kleines Manko hat das ganze jedoch: Google Gears Im Wordpress klappt momentan nur unter [...]
January 20th, 2008 at 5:07 am
[...] Blogging, Google June 4th, 2007 - 4,209 views. As many of you are already … After playing around with Gears for a while I realized that I could use it to … More Blog Resources [...]
January 22nd, 2008 at 11:56 am
Спасибо, замечательный плагин. Можно сказать на гребне волны технологий. Со временем установлю на своем блоге.
February 8th, 2008 at 5:52 am
I have been visiting this site a lot lately, so i thought it is a good idea to show my appreciation with a comment.
Thanks,
Jim Mirkalami
April 10th, 2008 at 5:24 pm
Hi there, I think I missed a trick here. I have Google Gears installed and get browse other sites. I have installed the plugin, followed the instructions but cannot get it to display or get the pop-up box to show.
I am right in think that I just need to insert this somewhere in my theme?
Many thanks for any suggestions
May 29th, 2008 at 11:47 am
Hi, this plugin is exactly what I was looking for.
However, the gears button does not show up.
I can also see that it does not show up on your site as well, even though the plugin seems to be active.
Any idea? Thanks!
May 31st, 2008 at 11:19 pm
[...] Make your blog compatible with Google Gears WP-Offline is a WordPress plugin that lets your readers cache your entire blog for offline reading using Google Gears. The plugin was released June, 2007. You can find more introduction from the original page. [...]
July 14th, 2008 at 12:11 pm
[...] our dear WordPress has also started using Offline web application technology. WP-Offline is a WordPress plugin that lets your readers cache your entire blog for offline reading. [...]
July 14th, 2008 at 8:20 pm
[...] our dear WordPress has also started using Offline web application technology. WP-Offline is a WordPress plugin that lets your readers cache your entire blog for offline reading. [...]
July 15th, 2008 at 3:32 pm
Great new plugin and great article. I am interested in adding a cache plugin and wondering if they can work together or are they over redundant ??
thanks again.
July 26th, 2008 at 4:46 am
Great stuff Mike, it would be great if regular visitors could use Gears to just cache the CSS and Images for repeat visits, so that the blog experience is much faster. No doubt we’ll probably see something like this for WP soon. Anyway great plugin.
August 11th, 2008 at 9:50 am
Great Article! I’ve been looking for this for my wordpress blog.