web development

JS errors and why concatenation is bad for devs

Right and wrong directions

In this article I want to take on a journey through bad code and show you how to defened yourself from such. Or, more importantly: I want you to know where the problem lies. I'm going to tell you how browsers execute code and why it matters. If you don't have time for full details, you might just want to skip to the end.

PWA: Detecting redirects in service workers

PWA app

Why do you need to detect redirects in a PWA page? Well a PWA is established on a specific domain. You might need to redirect to a new domain at some point. You can easily do it server side with simple commands, but as PWA is cached in a specific way it will remain on the old domain. PWA will not be able to do calls to redirected API because of CORS. And it might never move on because when your admin redirected domains you will not be able to get a new service worker either. So you need to think ahead and plan for this. But how?

PWA and HTTP Caching

In my previous PWA article I've covered PWA basics. In this article I will cover more complex situations where a simple Service Worker is not enough. I will also talk about differences between new Service Worker Cache and HTTP Cache and how they interact. That's because they do interact and not knowing how they work together might cause problems.

I assume you have basic knowledge of PWA and you've seen at least a basic Service Worker. If not, please read my previous article first.

From responsive website to PWA in one day

You've probably already heard about Progressive Web Apps, but just to refresh, you are simply building an application from your website. If your application is PWA compatible, users should be able to add a shortcut (link) to the app to their home screen (desktop). The app should also work to some extent off-line, which is done with a help of the Service Worker. Note that by complying with PWA rules you will improve experience for all your users! Not just for mobile users.

In this article I will talk about some basics of transforming an existing website into a PWA. I'm saying those are the basics, but in fact, within a day or two you should be able to create a fully functional PWA. You need to avoid some traps on your way, but I'll try to guide you through this minefield.

Web vs. native?

I've recently read PPK's article titled "Web vs. native: let’s concede defeat". I've also seen countless "web vs. native" debates in forms of either presentations or articles. Some of them claiming native is a sure winner, some that web is superior... I want to show how fruitless the debate really is and how you – as a developer – should decide (or help your boss decide).

Selektory CSS

Dzisiaj mam dla Ciebie, przechodniu, drobną ściągawkę z różnych selektorów CSS. Coś co pomaga mi (i Tobie też pomoże) w nadmiarowym bólu głowy przy tworzeniu wyglądu strony. Pomaga, gdy zastanawiam się czy mogę coś użyć czy nie... I czy aby na pewno potrzebuję jeszcze klasy parzysty-wiersz, czy jednak mogę w danym wypadku użyć po prostu nth-child(2n)...

Nowa witryna

Oto jest. Moja nowa witryna. Przez jakiś czas zastanawiałem się czy przenieść posty ze starej witryny, a potem o niej zapomnieć... Ale cóż chyba jestem sentymentalny i nie mam siły, żeby zagrzebać witrynę, która powstała... prawie 8 lat temu. Aż musiałem sprawdzić. Patrzę na ten czas z sentymentem, ale jednak trawa nie była wtedy bardziej zielona ;-).

Subscribe to web development