The API for fetching started as a target for criticism due to lack of timeout and cancellation of requests . Although this criticism can be argued as reasonable, you can not deny that the Fetch API has been quite impressive. As we have always done, if a function is missing, we can always fill it.
I recently thought about shimming in a time-out when retrieving and found a good retrieval / timeout script here. I have slightly modified it to prevent the phone calls
const FETCH_TIMEOUT = 5000; let didTimeOut = false; new promise (function (solve, refuse) ) .then (function () ) .catch (function (err) );
Wrap this code in a function called
fetchWithTimeout where you pass a timeout and retrieve URL / settings would work properly; because people like to use fetch in different ways, I have chosen not to make a generalized function and instead only deliver the basic logic.
Many would argue that the time-out of the server should come, but we all know that the departments of the front-end do not always have control over both sides of an application. If you are looking for a time-out for a time-out for a collection request, you can go here!
How I stopped WordPress Comment Spam
I like to be almost every part of a tech blogger: learning, preaching, cursing, researching. The only part about blogging that I absolutely do not like: dealing with SPAM comments. Over the past two years, my blog has registered 8,000+ SPAM responses per day. PER DAY. Bloating my database …
Introduction of MooTools ScrollSide
This message is a proof of concept post – the functionality still has to be perfected.
Imagine: you are on a website that uses horizontal scrolling instead of vertical scrolling. It is an artistic site, so you accept that the site scrolls from left to right.