Javascript object with undefined key

Read more →

A better approach to include GPT Ads in a Vue.js Single-Page Application

It’s been a while since I wrote Google Publisher Tag for DFP in a Vue.js Single-Page Application. Since the writing of the article I’ve refactored (and simplified my solution). The main trigger was a wrong assumption I made, as stated in the final disclaimer of the article: The setup I tried to explain in this article worked well for me but it might probably be improved (e.g. I suspect there’s no actual reason to destroy all slots when changing routes, some of them maybe you could just reuse).
Read more →

Google Publisher Tag for DFP in a Vue.js Single-Page Application

I’ve written A better approach to include GPT Ads in a Vue.js Single-Page Application. I’ve recently contributed to re-coding a legacy Symfony 1.x/jQuery website as a Vue.js SPA consuming a Python Lambda-based API. Improvement in terms of page load speed, total page size and number of requests has been great. With the same features and identical UI, we achieved an average decrease of 55% in page load time and requests and almost a 70% in downloaded data (images were poorly optimized, no gzip compression enabled, lots of dead and unreachable code…)
Read more →

Bookmarklet to identify those annoying x-overflows in your responsive site

Is not unusual when you’re adapting a desktop design to smaller devices to have some hidden element overflowing your viewport in the x-axis and causing this annoying and undesirable horizontal scroll. Sometimes it’s not easy to find the element that is breaking the layout, especially if you’re working on some legacy codebase you don’t really know. In those cases, I use this Javascript snippet to help me identify which element(s) are to blame.
Read more →

Finding active interval timers

I’ve been recently in the situation of having a legacy spaghetti website with a buggy behavior that clearly was executed at constant intervals but I didn’t have a clue of what code/function was being executed or even where was this code defined. Apparently no browser’s developer tools provides an easy way to inspect and debug timers. How many active setInterval do I have? Which functions are currently being called by setTimeout or setInterval timers?
Read more →