background preloader

Offline.js – Handle your users losing their internet connection like a pro

Offline.js – Handle your users losing their internet connection like a pro
What is Offline.js? Offline.js is a library to automatically alert your users when they've lost internet connectivity, like Gmail. It captures AJAX requests which were made while the connection was down, and remakes them when it's back up, so your app reacts perfectly. It has a number of beautiful themes and requires no configuration. Install The easiest way to add Offline to your site is with Eager. Click Install to see a live preview of Offline on your website. Download Offline.js Pick a Theme Indicator Themes Submit a theme! Documentation HubSpot

Lazy Load Plugin for jQuery Lazy Load is delays loading of images in long web pages. Images outside of viewport are not loaded until user scrolls to them. This is opposite of image preloading. Using Lazy Load on long web pages will make the page load faster. Plugin is inspired by YUI ImageLoader Utility by Matt Mlinac. For those in hurry there are several demo pages: basic options, with fadein effect, noscript fallback, horizontal scrolling, horizontal scrolling inside container, vertical scrolling inside container, page with gazillion images, load images using timeout and load images using AJAX(H). When checking the demos clear browser cache between each request. How to Use? Lazy Load depends on jQuery. You must alter your image tags. <img class="lazy" data-original="img/example.jpg" width="640" height="480"> $(function() { $("img.lazy").lazyload(); }); This causes all images of class lazy to be lazy loaded. PRO TIP! Setting Threshold By default images are loaded when they appear on the screen. PRO TIP! Using Effects

Bitcoin, Litecoin : montez votre propre mineur ! : Composants informatique yepnope.js | A Conditional Loader For Your Polyfills! AngularJS Best Practices: I’ve Been Doing It Wrong! Part 2 of 3 | Art & Logic Blog Three sanity-preserving ideas that will make me and you 10x more productive with real-world AngularJS applications This is the second in a three-part series on practical large-scale development with AngularJS. The TL;DR version is at the end of the article. If you have not read the first part, you might want to start with it. It lays out the foundation for the structure of a large-scale AngularJS project. In this part, I focus on automatic testing with AngularJS and ng-boilerplate project template. Part 2: Enjoyable Automated Testing Automatic testing is easy, natural, and helpful. Like any undesirable habit, the habit of not-testing-the-code can be fixed if tests are an integral part of our coding routine, and they get executed and checked without any conscious effort on our part. So, what does Karma do for you? Thanks to integration with Grunt, every time you modify a file, the test suite gets a re-run, and test results are regenerated. The official documentation says it best.

Numeral.js SpriteMe Moment.js | Parse, validate, manipulate, and display dates in javascript. CSS Sprites: What They Are, Why They're Cool, and How To Use Them By Chris Coyier On This article has been revised and re-written several times since its very first publication in 2007, to keep the information current. The most recent revision was done by Flip Stewart in January 2015. #What are CSS Sprites? Spoiler alert: they aren't fairies that write your stylesheets for you. To summarize: the term "sprites" comes from a technique in computer graphics, most often used in video games. CSS Sprites is pretty much the exact same theory: get the image once, and shift it around and only display parts of it. #Why use CSS Sprites? It may seem counterintuitive to cram smaller images into a larger image. Let's look at some numbers on an actual example: That adds up to a total of 14.38KB to load the three images. While the total image size (sometimes) goes up with sprites, several images are loaded with a single HTTP request. Thus, sprites are important for the same reasons that minifying and concatinating CSS and JavaScript are important. $ npm install sprity -g

Related: