Zum Inhalt springen

Archiv für die Kategorie "Gebastel"

Ch-ch-ch-changes

For a long time it has bugged me that the css for the recent version of my site was desktop-down. I made some adjustments for adaptive/responsive behaviour three or four years ago, but since the code base of my site is organically growing since I started it on WordPress in 2005… uhm, I think you get the picture. So all I did back then was to consider how the site should look on smaller screens, and making modifications inside max-width media queries, keeping all of the desktop-related stuff as the default styles, outside any media queries.
Of course when starting ...

Revisiting the Service Worker / Offline cache

Motivated by the sudden appearance of the "Add to home screen" prompt, I spent the last couple of hours to tune my Service Worker / caching behaviour:

- I can now exclude parts of my site from the service worker. This was an important feature for me, since the WordPress backend didn't sit too well with stubborn cached items.

- I established a number of caches for different items:
-- a "static" cache that has the base css and the page that gets displayed when the network is offline.
-- a "content" cache, that stores up to 25 URLs a visitor has, well, visited, while being online.
-- an "image" cache, that stores up to 45 image files, and finally
-- an "asset" cache for up to 35 files (everything that is not HTML and not an image).

The limits are rather random, but I think each cache has an build-in maximum of 50 entries (?), so to see if it works, I choosed numbers smaller than that.

Progressive Web(rocker)App

Ha! It! Really! Works!

I have to admit I was a bit sceptical of the outcome after I tweaked and added things and bits of my website at the Indiewebcamp in Nuremberg, setting up a service worker and offline caching things, adding a manifest file … while in theory I understand what all of this was supposed to do, I felt a bit dumb for not completly grasping how to control the stuff.

So as so often when learning new tricks on the web, it started with copy/pasting a working solution and trying to adapt this to my ideas.

But ...

Wrestling with the ServiceWorker

Dear js gurus in my timeline, is this the correct way to exclude urls from the power of ServiceWorkers?

Putting the 'I' in Indieweb

It's about time for a write-up of the latest tweaks and developments on my site to get this note/status posting and syndicating over to twitter working, which is still a little bit messy, a mixture of plugins and self-made hacks.

There's still plenty to do, but slowly it is coming together:

- I am using normal WordPress posts, but with the custom post format of 'status' for the 'tweets'. Maybe I'll switch this to a custom post type, which will make excluding these posts from the 'normal' loop and rss feeds ...

Add class attribute to WordPress "the_tags" markup

I'm in the process of gradually enhancing my site's markup with microformats, in order to "indiewebify" my site further.
On thing I noticed while working on this at the Düsseldorf Indiewebcamp, is that WordPress (or the way my theme handles) tags on posts has no way to get an additional class inside the link markup. I noticed this while POSSEing to flickr -- my categories were transferred, my tags not so much, because the class="p-category" was missing. I found a way to modify the the_tags output by hooking into WP's term_links-$taxonomy filter in my theme's function.php.

Maybe there's a smarter ...

Indiewebcamp Düsseldorf, Day 2

Sitting in my hotel room, watching the sun rise, while some people are having a good time at a party that's happening right next to the hotel…

The bass penetrates everything, walls, windows, even my ear plugs. So, why not use this early hour and reflect on the topics and discussions that happened yesterday?

The discussion around having your website kind of your identity provider, with ways of having your complete 'web output' there, notes, photos, whatnot, and still retaining some kind of 'separate' identities for different relations like a 'professional profile' or for sports/hobby related acquaintance is very interesting to ...

WordPress 4.5.2 Security Update

WordPress Logo an die VW-Fabrik gephotoshopped

Heute Nacht ist ein neues Sicherheitsupdate für WordPress erschienen und hat sich hier bei mir auch auf diversen Seiten selbst aktualisiert:

WordPress versions 4.5.1 and earlier are affected by a SOME vulnerability through Plupload, the third-party library WordPress uses for uploading files. WordPress versions 4.2 through 4.5.1 are vulnerable to reflected XSS using specially crafted URIs through MediaElement.js, the third-party library used for media players. MediaElement.js and Plupload have also released updates fixing these issues.

wordpress.org

Linklist - Serviceworker & cache

https://www.w3.org/TR/service-workers/

https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API

https://ponyfoo.com/articles/progressive-networking-serviceworker

https://gist.github.com/adactio/4d588bb8a65fa11a3ea3

https://brandonrozek.com/2015/11/limiting-cache-service-workers-revisited3/

https://ponyfoo.com/articles/progressive-app-serviceworker

https://jakearchibald.com/2016/-best-practices/