For those of us who develop or work with backends with RESTful APIs, I wrote a little tool at http://x2node.com/api-tester/ that allows using a browser to make calls to the backends, mostly for testing. It’s useful when the application’s UI part is not yet ready but you already need to start making calls to the web-service you’re working on. The tool is part of the X2 Framework for Node.js ecosystem, but it’s generic and will work with any RESTful web-service. Enjoy!
Category Archives: Tips & Tricks
A fix for Drupal 8’s broken preview
Drupal 8 is still beta-ish in so many aspects, that “workarounds” is becoming a separate genre of Drupal development tips and tricks.
The today’s workaround is for the bug in “node preview” functionality. It is not frequently used, but can be rather convenient for large websites with moderation enabled. The bug can be spotted only when CSS styles, applied to the node/page template rely on the <body> CSS classes, namely the core-added page-node-type-[node bundle] body class. It helps to effectively distinguish different node templates, and therefore are widely relied on by front-end developers. However, in preview mode, this class appears entirely missing, which breaks the styling.
Drupal 8 Migration: Field Updates
By default, the migrate module in Drupal 8 updates existing nodes by completely overwriting all the fields in the target node with the data from the migration. But what if your client has modified content on the target (D8) system, and still wants to update the content with newly-mapped fields? For instance, there is a “description” that has been updated after the first migration, but now the client wants “subtitle” field to be migrated (which was empty or not present during the first pass), without overwriting the description field changes. Continue reading
Do you mind closing that window?
It is a well-known fact that external links can be opened in a new browser window via
target="_blank"
. It is a little-known fact that this can cause security risks and performance issues on your own webpage.
Continue reading
How to get 100 points on SSL Labs
Handy frontend tools in Chrome
Chrome 60 will be released to the public very soon but there are two handy frontend tools worth noting, which were introduced in Chrome 59: identify unused CSS and JS on a particular page and take a full page screenshot.
Critical Above-the-Fold CSS for the rescue
Nowadays site loading time became a very important parameter, especially when it comes to the search engine rankings.
If you’ll test your site with Google Pagespeed tool, it will probably show that your site has some issues with content-blocking stylesheets. This means that the browser won’t paint content to the screen until your CSS has been downloaded. To fix this issue, Google recommends us to split our styles into two parts: critical (above-the-fold) and non-critical. Critical CSS should be inlined in the header meanwhile non-critical needs to be loaded asynchronously, so a user could see styled content as soon as possible. Continue reading
CSS layout tools
The day has come. There is no need any more for floats or tables or other hacks to create page layouts on the web. CSS can do it. Finally, it has its own tools for laying out pages properly.
Continue reading
Squeezing all the juice from HTTP/2
Since we are well into the 21st century and HTTP/1.1 is no longer enough for most of us, let’s discuss some ways we can speed up our websites to run them faster, more securely, etc.
Many people have heard of HTTP/2 protocol, but not everyone knows how to use all its features.
Lets take a look at some 🙂
Personalizing cached HTML pages with Varnish
Everyone is using Varnish to speed up their sites nowadays. Varnish greatly decreases page load time on websites with mostly anonymous traffic. But many anonymous sites still need to personalize content a bit based on user geo location, time-of-day, the languages the browser claims to support, etc.