Implementing A Service Worker For Single-Page App WordPress Sites – Smashing Magazine

LOAD AN APPLICATION SHELL (OR APPSHELL) FIRST LINKIf the SPA architecture supports it, load an appshell first (i.e. minimal HTML, CSS and JavaScript to power the user interface), under https://www.mydomain.com/appshell/. Once loaded, the appshell will dynamically request content from the server through an API. Because all of the appshell’s assets can be precached using service workers, the…

How to Install Node.js and NPM on a Mac

In this article, I’ll take you through the process of installing Node.js and NPM on a Mac using Homebrew. Installing Node.js and NPM is pretty straightforward using Homebrew. Homebrew handles downloading, unpacking and installing Node and NPM on your system. The whole process (after you have XCode and Homebrew installed) should only take you a…

SQL to Change WordPress Domain URL (Example)

/* Begin Here */UPDATE wp_posts SET guid = replace(guid, ‘http://olddomain.com’,’http://newdomain.com’);UPDATE wp_posts SET post_content = replace(post_content, ‘http://olddomain.com’, ‘http://newdomain.com’);UPDATE wp_links SET link_url = replace(link_url, ‘http://olddomain.com’, ‘http://newdomain.com’);UPDATE wp_links SET link_image = replace(link_image, ‘http://olddomain.com’, ‘http://newdomain.com’);UPDATE wp_postmeta SET meta_value = replace(meta_value, ‘http://olddomain.com’, ‘http://newdomain.com’);UPDATE wp_usermeta SET meta_value = replace(meta_value, ‘http://olddomain.com’, ‘http://newdomain.com’);/*UPDATE wp_options SET option_value = replace(option_value, ‘http://olddomain.com’, ‘http://newdomain.com’) WHERE option_name =…

Holy Grail | Alligator.io

Holy Grail has been achieved using variety of methods, probably most notably recently with Flexbox. CSS Grid Layout is yet another method, and it should prove to be the most appropriate and straightforward way when browser support gets better. It was designed especially to easily accomplish full page layouts. Source: https://alligator.io/css/css-grid-holy-grail-layout/

WordPress Time

echo “current_time( ‘mysql’ ) returns local site time: ” . current_time( ‘mysql’ ) . ‘ ‘; echo “current_time( ‘mysql’, 1 ) returns GMT: ” . current_time( ‘mysql’, 1 ) . ‘ ‘; echo “current_time( ‘timestamp’ ) returns local site time: ” . date( ‘M j, Y g:i a’, current_time( ‘timestamp’, 0 ) ) . ‘…