Programming

JavaScript Refresh Page

How to Refresh the Page in JavaScript using location.reload(), With Examples

Here’s a short guide to refreshing a webpage with JavaScript, with examples. There are over 500 ways to trigger a page reload using JavaScript. All but one are unofficial or are the side effect of another behavior. Here’s how to do it properly. Using location.reload() Simply… Read More »How to Refresh the Page in JavaScript using location.reload(), With Examples

JavaScript Compare Dates

Compare JavaScript Dates (Day/Minute/Hour/Before/After), With Examples

Following on from our article on adding and subtracting time from dates in JavaScript – here’s how to compare two JavaScript date objects. This article will explore comparing dates/times with different granularity levels – from dates that are an exact month to dates that fall in the… Read More »Compare JavaScript Dates (Day/Minute/Hour/Before/After), With Examples

MySQL Truncate

The MySQL (and Maria DB) TRUNCATE Command, With Examples (And Warning!)

MySQL (and its functional equivalent, MariaDB) have two things named TRUNCATE – so watch out which one you want to use or suffer dire consequences! This article outlines the difference and usages of the MySQL TRUNCATE function and TRUNCATE TABLE statement – they share similar names but do very different things.… Read More »The MySQL (and Maria DB) TRUNCATE Command, With Examples (And Warning!)