Trick: Solving HTTP/2 Server Push caching issues with Service Workers!

When a browser requests a page, the server is sending the HTML as a first response. Then the browser starts working and parses the HTML to find all kinds of embedded assets like JavaScript and CSS. The browsers needs to go back to the server again and ask for these files. Server Push allows the server avoid this round trip and push the files directly together with HTML so no valuable time is lost. Many cloud hosting providers like Cloudflare start supporting HTTP/2 Server Push already: Announcing Support for HTTP/2 Server Push

Sounds great right? There is only one small problem: caching doesn’t work properly since Server Push is not aware of previous visits and will not check cached resources.  Server Push always tells the browser that it is should receive the files from the server, whatever happened before.

Continue reading

Baidu copies Google AMP and launches MIP (Mobile Instant Pages)

During the past few months Baidu has been busy with copying Google’s AMP (Accelerated Mobile Pages Project) and late August they launched MIP, also known as Mobile Instant Pages.

The concept of MIP is basically the same as Google AMP: create an additional page while using only specific HTML markup, hosted JS libraries and a just a predefined set of elements are allowed in combination with local caching. This creates a better user experience due to faster loading content. It is not known yet when Baidu is going to put MIP results into all their search engine result pages: this will probably take another few weeks since they just launched and almost no websites have created MIP pages yet. For some queries, like Olympic Games related keywords, MIP results do show up (link) Another item on the massive to do list next to building AMP pages for many content driven organisations. Example via Dragonmetrics blog:

mip-demo

Why MIP next to AMP?

Censorship: it is likely most users can’t access Google’s servers that host AMP versions.

Documentation and more

– Official (Chinese) guide: MIP Documentation
– Validator: external via NPM package mip-validator 1.2.11 or use the tool within Baidu Webmaster tools Zhanzhang.baidu.com/mip/
– Pages ready? You need to submit then Submit MIP Pages

Quickly merge Excel files, spreadsheets or tabs with VBA

Sometimes you just need to merge hundreds of Excel files into one. For CSV files you can easily use the Command Prompt, for Excel you’ll need some VBA scripting. Working with many individual files can be time consuming so use below VBA scripts to merge individual XLS-files into one or combine multiple tabs into one sheet. Simply go to the Visual Basic Editor (Alt / Fn + F11), add a new module and run the script. An easy to understand tutorial can be found at The Excel VBA editor.
Continue reading