Wednesday, September 4, 2019

Are you looking for hacks to maximize your Company Pages engagement? LinkedIn has it all covered for you!

Recently, LinkedIn shared a new list highlighting the ten most followed company pages on its platform and you probably guessed most of them already. According to a recent release by LinkedIn, for any new business companies who are looking to maximize their company pages on the professional...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by agha ali via Digital Information World

Firefox 69 released, and how to 'rotate' the mouse cursor with CSS

#407 — September 4, 2019

Read on the Web

Frontend Focus

My Favorite CSS Hack* { border: 1px solid red } is a classic ‘trick’ for debugging CSS and HTML issues by putting borders around every element. This tip takes a few extra steps, however, and helps you get a better overview, particularly with nested elements.

Gajus Kuizinas

How Web Content Can Affect Power Usage — Users spend a large proportion of their online time on mobile devices, or on untethered laptop computers. This post digs into factors that affect battery life, and how to make your pages more power efficient so that users can spend more time engaged with your content.

Benjamin Poulain and Simon Fraser (WebKit)

The Secret to Agile Transformation — Discover how to empower web teams to collaborate more effectively, increase the rate of iteration on your site, and drive business results. The secret? WebOps and web teams. Watch now to find out why.

Pantheon sponsor

Firefox 69 Released: What's New for Developers

Mozilla

In A Swipe At Chrome, Firefox Now Blocks Ad Trackers by Default — Firefox 69, as released this week (above), enables Enhanced Tracking Protection by default, which blocks cryptominers and certain types of third party cookies designed to track users for advertising purposes.

Laurie Clarke (WIRED)

Bottom Navigation Pattern on Mobile Web Pages: A Better Alternative? — With bigger phones comes the need to adjust how we both build and design mobile sites. This article digs into how to create mobile navigation with lower user interaction costs.

Arthur Leonov

The Baseline Interpreter: A Faster JS Interpreter in Firefox 70 — JIT (Just-In-Time) compilation was once all the rage for speeding up JavaScript but a faster interpreter can result in significant performance improvements on modern workloads and here’s how it works.

Jan de Mooij

💻 Jobs

Frontend Developer at X-Team (Remote) — Join the most energizing community for developers. Work from anywhere with the world's leading brands.

X-Team

Find a Frontend job through Vettery — Make a free profile, name your salary, and connect with hiring managers from top employers.

Vettery

📙 Articles, Tutorials & Opinion

Working with Attributes on DOM Elements — The DOM is just a little weird about some things, and the way you deal with attributes is no exception..

Chris Coyier

How to Dynamically Change the Colors of Product Images using CSS Blend Mode and SVG — Learn a simple technique for adding a color swap functionality to images on a page by creating an SVG and applying mix-blend-mode to the composition.

Kyle Wetton

Accessibility for Web Developers. Get the Whitepaper — Learn everything you need to know about accessibility standards, how to conform to the laws and what this means to you.

Progress Kendo UI sponsor

Overflow and 'Data Loss' In CSS — By default, elements expand to fit the content within them, but if you want to specify sizes for elements, content could ‘overflow’ within then. This is controllable and Rachel looks at the options.

Rachel Andrew

X3D: Declarative 3D for the Modern Web — A look at X3D and how it offers a simple declarative approach for including 3D visualizations into web pages.

Adrian Sureshkumar

How the caption-side Property Controls the Position of a Table Caption — An interesting tip because not only might you be unaware of caption-side, <caption> itself is not very well used either.

Stefan Judis

What to Consider When Planning a Website Redesign

TJ Welsh

Did You Know, As of HTML5, Anchor Tags Can Contain Block-Level Elements?

Ben Nadel

Need to Scroll to the Top of the Page? — If you want users to be able to jump to the top of the page quickly, there are a few approaches..

Chris Coyier

🔧 Code, Tools & Resources

TOAST UI Grid 4.5: A Data Grid Control for the Web — This no-dependency TypeScript-based data grid component works down to IE9, works with many data types, has advanced sorting capabilities (which you can customize), and is easily re-themed.

NHN Entertainment

instant.page 2.0: Preload Link Target Pages ASAP — You include some JavaScript in your page and the browser will begin to preload the destination page the second someone clicks on a link. This can result in a slight, but noticeable, performance increase.

Alexandre Dieulot

Make Your Images & Videos Load Fast & Look Beautiful with Cloudinary

Cloudinary sponsor

CSS Duotone Generator — Bring in an image, apply effects, and then generate the HTML and CSS you need to reproduce it on a page.

Rick Metzger

dark-mode-screenshot: Take Both Light and Dark Mode Screenshots with Puppeteer — If you’re using Puppeteer as part of a testing or screenshotting process, did you know you can specify whether or not dark mode CSS rules should be respected or not?

Bram van Damme

Can You Rotate the Mouse Cursor in CSS? — Not exactly, but there’s a very neat looking workaround to pulling off the same effect. The demo here is cool to look at, if a little disorienting.

Chris Coyier

   ðŸ—“ Upcoming Events

Web Unleashed 2019, September 13-14 — Toronto, Canada — Covers a variety of front-end topics leaving you 'informed, challenged and inspired'.

State of the Browser, September 14 — London, UK — A one-day, single-track conference with widely varying talks about the modern web.

CSSConf, September 25 — Budapest, Hungary — A community conference dedicated to the designers and developers who love CSS.

Accessibility Scotland, October 25 — Edinburgh, UK — One day of talks. Friendly, open discussion about accessibility.


by via Frontend Focus

Video Marketing Is The Top Preference of Digital Marketers For The Year 2019-2020; Voice Search Is Falling Down

Before we begin with what the research has shown, ask yourself what kind of advertisement really attracts or intrigues you? The answer would most probably favor the content that is made well in the form of a video, right? As visuals are becoming an integral part of digital marketing, this recent...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Daniyal Malik via Digital Information World

Build a Real-time Voting App with Pusher, Node and Bootstrap

In this article, I'll walk you through building a full-stack, real-time Harry Potter house voting web application.

Real-time apps usually use WebSockets, a relatively new type of transfer protocol, as opposed to HTTP, which is a single-way communication that happens only when the user requests it. WebSockets allow for persistent communication between the server and the user, and all those users connected with the application, as long as the connection is kept open.

A real-time web application is one where information is transmitted (almost) instantaneously between users and the server (and, by extension, between users and other users). This is in contrast with traditional web apps where the client has to ask for information from the server. — Quora

Our Harry Potter voting web app will show options (all the four houses) and a chart on the right side that updates itself when a connected user votes.

To give you a brief idea of look and feel, the final application is going to look like this:

Harry Potter with Chart JS

Here's a small preview of how the real-time application works:

To make our application real-time, we’re going to use Pusher and WebSockets. Pusher sits as a real-time layer between your servers and your clients. It maintains persistent connections to the clients — over a WebSocket if possible, and falling back to HTTP-based connectivity — so that, as soon as your servers have new data to push to the clients, they can do so instantly via Pusher.

Building our Application

Let’s create our fresh application using the command npm init. You’ll be interactively asked a few questions on the details of your application. Here's what I had:

praveen@praveen.science ➜ Harry-Potter-Pusher $ npm init
{
  "name": "harry-potter-pusher",
  "version": "1.0.0",
  "description": "A real-time voting application using Harry Potter's house selection for my article for Pusher.",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/praveenscience/Harry-Potter-Pusher.git"
  },
  "keywords": [
    "Harry_Potter",
    "Pusher",
    "Voting",
    "Real_Time",
    "Web_Application"
  ],
  "author": "Praveen Kumar Purushothaman",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/praveenscience/Harry-Potter-Pusher/issues"
  },
  "homepage": "https://github.com/praveenscience/Harry-Potter-Pusher#readme"
}

Is this OK? (yes)

So, I left most settings with default values. Now it's time to install dependencies.

Installing Dependencies

We need Express, body-parser, Cross Origin Resource Sharing (CORS), Mongoose and Pusher installed as dependencies. To install everything in a single command, use the following. You can also have a glance of what this command outputs.

praveen@praveen.science ➜ Harry-Potter-Pusher $ npm i express body-parser cors pusher mongoose
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.

+ pusher@2.1.2
+ body-parser@1.18.3
+ mongoose@5.2.6
+ cors@2.8.4
+ express@4.16.3
added 264 packages in 40.000s

Requiring Our Modules

Since this is an Express application, we need to include express() as the first thing. While doing it, we also need some accompanying modules. So, initially, let’s start with this:

const express = require("express");
const path = require("path");
const bodyParser = require("body-parser");
const cors = require("cors");

Creating the Express App

Let’s start with building our Express application now. To start with, we need to get the returned object of the express() function assigned to a new variable app:

const app = express();

Serving Static Assets

Adding the above line after the initial set of includes will initialize our app as an Express application. The next thing we need to do is to set up the static resources. Let’s create a new directory in our current project called public and let’s use Express's static middleware to serve the static files. Inside the directory, let’s create a simple index.html file that says “Hello, World”:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Hello, World</title>
  </head>
  <body>
    Hello, World!
  </body>
</html>

To serve the static files, we have a built-in .use() function with express.static() in Express. The syntax is as follows:

app.use( express.static( path.join(__dirname, "public") ) );

We also need to use the body parser middleware for getting the HTTP POST content as JSON to access within the req.body. We'll also use urlencoded to get the middleware that only parses urlencoded bodies and only looks at requests where the Content-Type header matches the type option. This parser accepts only UTF-8 encoding of the body and supports automatic inflation of gzip and deflate encodings:

app.use( bodyParser.json() );
app.use( bodyParser.urlencoded( { extended: false } ) );

To allow cross-domain requests, we need to enable CORS. Let’s enable the CORS module by using the following code:

app.use( cors() );

Now all the initial configuration has been set. All we need to do now is to set a port and listen to the incoming connections on the specific port:

const port = 3000;
app.listen(port, () => {
  console.log(`Server started on port ${port}.`);
});

Make sure your final app.js looks like this:

const express = require("express");
const path = require("path");
const bodyParser = require("body-parser");
const cors = require("cors");

// Create an App.
const app = express();

// Serve the static files from public.
app.use( express.static( path.join(__dirname, "public") ) );

// Include the body-parser middleware.
app.use( bodyParser.json() );
app.use( bodyParser.urlencoded( { extended: false } ) );

// Enable CORS.
app.use( cors() );

// Set the port.
const port = 3000;
// Listen to incoming connections.
app.listen(port, () => {
  console.log(`Server started on port ${port}.`);
});

Run the command to start the server:

$ npm run dev

Open your http://localhost:3000/ on a new tab and see the magic. You should be seeing a new page with “Hello, World”.

Preview of Hello World in Browser

The post Build a Real-time Voting App with Pusher, Node and Bootstrap appeared first on SitePoint.


by Praveen Kumar via SitePoint

The likes on social media apps are harming the society, here’s how

Today’s generation is so much stuck with their digital devices that they somehow forget to look beyond social media apps. Nowadays, users rely on social network for everything. Whether it is a new look they want to search or some new nearby restaurant, people pretty much rely on internet for almost...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by agha ali via Digital Information World

Will Google Chrome force users to view ads in Picture-in-Picture mode?

Google is rolling out a new update for the Chrome Canary and Dev, which will bring a change to its ‘picture-in-picture’ view. The most prominent change in the update is the absence of the mute button from the Chrome PiP that was added to the program in February. However, according to...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Saima Salim via Digital Information World

There’s a new hype regarding the 5G technology but is it worth it? Let’s find out!

5G is the next generation of wireless network technology and it’s now talk of the town. A variety of carriers like T-Mobile, AT&T are promoting their new 5G networks and along with these, there are also a variety of new smartphones enabled to operate with 5G technology. Tech is changing but...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by agha ali via Digital Information World