How To

How To Read Files With JavaScript And FileReader

Analysing files in PHP is easy. But what if you want to access the content of a file without the overhead of sending it to a server first (e.g. for displaying a thumbnail before uploading an image)? JavaScript provides a neat little API to achieve just that. It's called FileReader. Let's find out what

By |2018-10-29T20:09:37+01:00October 29th, 2018|0 Comments

How To Build A Live Chat With WebSockets

WebSockets are a fascinating technology, a TCP-based network protocol that allows for asynchronous bi-directional communication. The client starts a connection, sends a request and gets a response - just like HTTP. But much unlike HTTP this connection is kept alive! This has many advantages, like Faster responses (no re-establishing connections) Less trafic (no overhead

By |2018-10-17T08:02:32+02:00October 17th, 2018|0 Comments

How To Take A Screenshot With JavaScript

Wouldn't it be great if you could allow users to create screenshots of your website?! Apart from being a fun exercise this feature could come in handy when you're providing some kind of visual editor. After users customized their individual product, you could show them an image of what they created on checkout.

By |2018-10-09T09:05:10+02:00October 9th, 2018|0 Comments

How To Remove Classes By Prefix In Vanilla JavaScript

Removing a class from an HTML-Element with JavaScript is easy enough. You could use jQuery for it by calling or, just as simple, go vanilla with: But what if you wanted to remove all classes starting with a prefix? Assume we have a DOM-Node like this: We want to remove all

By |2018-10-05T12:39:32+02:00October 4th, 2018|0 Comments
Go to Top