Category: Webdev

Good to know – HTTP Protocol

When tinkering with OData, as well as SAC i’m reminded of the good-old-days of web-development, POST and GET requests, AJAX and service workers: What sounds like a toilet cleaner and a waiter in the restaurant, actually it’s all about the early days of asynchronous web-development and webapps. – Time to have closer look at the prime father of the world...

Lighttpd on arch

lighttpd, PHP, MariaDB https://wiki.ubuntuusers.de/lighttpd/ https://redmine.lighttpd.net/projects/lighttpd/wiki/TutorialConfiguration Installation pacman -S lighttpd pacman -S php php-cgi mariadb mariadb-clients mariadb-install-db –user=mysql –basedir=/usr –datadir=/var/lib/mysql Infos: Two accounts: root@localhost, mysql@localhost To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system You can start the MariaDB daemon with: cd ‘/usr’ ; /usr/bin/mysqld_safe –datadir=’/var/lib/mysql’ You can test the MariaDB daemon...

Remove jscript – CSS only mobile navigation

Finally made it… My page (not this one, though) is totally JS-free. No cookies, no JavaScript. Just plain HTML and CSS. This gives a better user experience, fast page loading times, and a better Lighthouse score.. The last bit, was to change the mobile navigation. I used this snippet to make it work: https://codepen.io/mutedblues/pen/MmPNPG

Google FLoC

To opt out on your site: https://blog.zgp.org/floc-opt-out/ https://plausible.io/blog/ Test: https://securityheaders.com/

Convert images to Webp

1) Install sudo apt install libwebp-dev sudo apt install webp 2) convert cwebp source.png -o target.webp see: https://developers.google.com/speed/webp/docs/using

Apache2 https and .htaccess Rewrite Engine

Problem: After installing Apache2 some local site, which has a .htaccess-file cannot be opened, and shows the error message: “Internal Server Error. The server encountered an internal error or misconfiguration and was unable to complete your request.” The logfile /var/log/apache2/error.log says “/path/.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration”. .htaccess has...

Optimizing CSS

Based on my last post “Google Core Web Vitals 2020” i’ll review and optimize my CSS declarations, as Lighthouse complains already: “Eliminate render-blocking resources”. So here we go: Step 1) analyze existing css-file and remove unused stuff Who needs comments anyway 😉 Step 2) separate CSS files The next thing came into my mind, was trying to separate css for...

Google Core Web Vitals 2020

In May 2020 google announced that the so called “Core Web vitals” will influence the google site ranking. So, besides mobile friendliness, safe browsing, HTTPS and “non-intrusive interstitials” (aka popup-ads) the following three elements of the “Core Web vitals” will have a big influence on a sites ranking: – Loading: Measured by the “Largest Contentful Paint” (LCP) – Interactibility: Measured...

Change Apache2 Webfolder

Problem: I have stored my local Websites in ~/Documents/Sites/ however the standard Apache2 Directory is /var/www/html. To change this: 1) vi /etc/apache2/sites-available/000-default.conf 2) Change DocumentRoot to desired location: /path/to/my/project 3) vi /etc/apache2/apache2.conf 4) Change directory setting to: < Directory /> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Require all granted < /Directory> 5) Restart Apache: sudo service apache2 restart In...