Chrome to provide native image lazyload support sonic0002 446 0 Previously we have introduced how Medium achieved loading images lazily, basically what they did was using lots of HTML tags and CSSs to change the images at different stage. It needs lots of code to do this. With the high demand of this feature for resource consumption and performance consideration, Chrome is now working on a feature to provide native support for loading images/iframes lazily. This feature is named lazyload.lazyload will allow three values:auto: the default behavior of laz...

JavaScript to open link in new window without being popup blocked sonic0002 85 0 To ensure security and reduce spamming, modern browsers have implemented very strict rules on when a new window can be opened in a web page. Currently browsers restrict that any new web page to be opened in a new window must be initiated with an user action. The action is usually an user click event. Otherwise, a popup blocker would show on the browser address bar which indicates that something is blocked.To workaround this issue, normally you should implement the window open logic in a click ev...

Remove duplicated elements in JavaScript array sonic0002 749 0 During interviews, one frequent question asked would be something like how to remove duplicated elements in a JavaScript array and how many different ways you can think of. The interviewee would also be asked to write the code down. In real applications, normally front end would not need to handle this case since normally it would be done by backend, but still it's necessary for front end developers to know different ways of doing this.This post will share some of the common ways to remove dupli...

Easy Ways To Make Sure Your Website Is Ready For Mobile First Users taylordanrw 117 0 Websites are no longer a novelty or a useful complement to a brick and mortar store. They are an essential part of everyday life. The average American is spending up to ten hours every day online. Businesses exist solely online, entrepreneurs with great ideas can start up online with very little help and even the most casual of users know what looks good. Consumers aren't likely to forgive mistakes. If your website isn't completely user-friendly, they know they c...