ES5, ES6, ES2016, ES.Next: What’s going on with JavaScript versioning?

JavaScript has a strange naming history. For its initial release in 1995 as part of Netscape Navigator, Netscape labeled their new language LiveScript, before renaming it to JavaScript a year later, hoping to capitalize on Java’s popularity at the time (JavaScript has no actual relationship to Java). In 1996 Netscape submitted JavaScript to ECMA International for standardization. This eventually resulted in a new language standard, labeled ECMAScript. All major JavaScript implementations since have actually been implementations of the ECMAScript standard, but the term JavaScript has stuck for historical and marketing reasons 1. In the real world ECMAScript is usually used to refer to the standard while JavaScript is used when talking about the language in practice.

This has mostly been trivia for JavaScript developers, because ECMAScript didn’t change much for the first 15 years of its existence, and real world implementations often differed significantly from the standard. After the initial version of ECMAScript, work on the language continued and two more versions were quickly published. But after ECMASCript 3 came out in 1999, there were no changes made to the official standard for a decade. Instead various browser vendors made their own custom extensions to the language, and web developers were left to try and support multiple APIs. Even after ECMAScript 5 was published in 2009, it took several years for wide browser support of the new spec, and most developers continued to write code in ECMAScript 3 style, without necessarily being aware of the standard.

Around 2012 things started to change. There was more of a push to stop supporting old Internet Explorer versions, and writing code in ECMAScript 5 (ES5) style became much more feasible. At the same time work was underway on a new ECMAScript standard, at which point it became much more common to start referring to JavaScript implementations in terms of their support for different ECMAScript standards. The new standard was originally named ES.Harmony, before eventually being referred to as ECMAScript 6th Edition (ES6). In 2015 TC39, the committee responsible for drafting the ECMAScript specifications, made the decision to move to a yearly model for defining new standards, where new features would be added as they were approved, rather than drafting complete planned out specs that would only be finalized when all features were ready. As a result ECMAScript 6th edition was renamed ECMAScript 2015 (ES2015) before it was published in June.

Currently there are several proposals for new features or syntax to be added to JavaScript. These include decoratorsasync-await, and static class properties. These are often refered to as ES7, ES2016, or ES.Next features, but should realistically be called proposals or possibilities, since the ECMAScript 2016 specification hasn’t been written yet, and might include all or none of those features. TC39 divides proposals into 4 stages. You can see the current state of various proposals on the TC39 Github repo.

So where does that leave us in terms of terminology? The following list might be helpful:

  • ECMAScript: A language standardized by ECMA International and overseen by the TC39 committee. This term is usually used to refer to the standard itself.
  • JavaScript: The commonly used name for implementations of the ECMAScript standard. This term isn’t tied to a particular version of the ECMAScript standard, and may be used to refer to implementations that implement all or part of any particular ECMASCript edition.
  • ECMAScript 5 (ES5): The 5th edition of ECMAScript, standardized in 2009. This standard has been implemented fairly completely in all modern browsers
  • ECMAScript 6 (ES6)/ ECMAScript 2015 (ES2015): The 6th edition of ECMAScript, standardized in 2015. This standard has been partially implemented in most modern browsers. To see the state of implementation by different browsers and tools, check out these compatibility tables.
  • ECMAScript 2016: The expected 7th edition of ECMAScript. This is scheduled to be released next summer. The details of what the spec will contain have not been finalized yet
  • ECMAScript Proposals: Proposed features or syntax that are being considered for future versions of the ECMAScript standard. These move through a process of five stages: Strawman, Proposal, Draft, Candidate and Finished.

Going forward in this blog, I’ll be referring to the recent ECMAScript version as ES6 (since that is how it is best known by most developers), next years spec as ES2016 (since that will be what it is called the whole way through its standardization process, unlike ES6/ES2015) and future language ideas that are not yet part of a draft or finalized spec as ECMAScript proposals or JavaScript proposals. I’ll do my best to point back to this post in any cases that might be confusing.

Civilian security and protection

The approaches employed by humanitarian actors to protect civilians, and the linkages between protection analysis and programming, are key components of the Humanitarian Policy Group’s work.

The starting point for this ongoing area of focus is an understanding of the threats faced by communities in different contexts, the steps they take to reduce risks, and the extent to which national and international mechanisms offer effective protection.

Research explores the respective roles of military, political, human rights and humanitarian actors in civilian protection and the extent to which these are complementary, both at policy and practice levels. The implications of different forms of settlement – like camps, other settlements or hosting arrangements – for civilian security will be the immediate focus of work under this theme.

Sub themes

  • Aid workers in insecure environments
  • Practice of protection
  • Protection and livelihoods
  • Civil-military coordination

Taxpayer Alert! 8 tax tasks you need to finish by March 31

March 31 this year is falling on a Sunday, while 30th of March will be the 4th Saturday of the month and a holiday for the banking industry. This means 29th March will be the last working day of this financial year unless the government issues directions to the banks.

If you are issuing cheques, making online payments through net banking, NEFT etc, ensure the funds get credited to your respective investments within this financial year. If payment goes through next year, the tax benefits may not be available for this year.

For a hassle-free FY, here are 8  tax-related and other financial tasks you should complete before March 31st.

1. Late filers of ITR

The last date for filing an income tax return (ITR) for the financial year 2017-18 was August 31, 2018. However, if you had missed filing it, make sure to file it before March 31, 2019, even though you cannot escape the penalty under the newly introduced section 234F of the Income Tax Act. “If any individual taxpayer missed the due date of 31st August 2018 to file their return, they can still file it before 31st March 2019 by paying a fee of Rs 10,000. Note that late fee is restricted to Rs 1,000 for those with total income up to Rs 5 lakh,” informs Archit Gupta, Founder & CEO ClearTax.

2. Changed jobs? You need to file Form 12B

If you have changed jobs during the FY 2018-19, you should ensure that you have submitted Form 12B to your new employer.  In the previous organisation, you might have submitted investment declaration for the purpose of tax saving, based on which the employer would have deducted the taxes accordingly. Form 12B is a statement wherein you will have to provide your new employer with the amount of income and taxes deducted by your previous employer.“Once the employee submits Form 12B with the required details, the new employer will furnish a Consolidated Form 16 at the end of the year based on the details provided by the new employee in Form 12B,” says Gupta. Not doing this will end up in paying taxes at the time of filing your ITR for the AY 2019-20.

3. Complete your tax savings

The maximum limit under section 80C stands at Rs 1.5 lakh and it includes investments into specific instruments such as PPF, NSC, ELSS etc. and also expenses such as tuition fees, home loan Principal payments amongst others.  If you wish to reduce your tax liability, make sure, you have exhausted this limit before the FY ends.  Simultaneously, you may consider tax saving under section 80 D on premium paid towards health insurance up to Rs 25,000 ( Rs 50,000 for senior citizen) for self and family.

The maximum that you can save under section 80C will be based on your tax slab.

4. Submit investment proofs to your employer

If you have already taken care of all tax savings, submit the documentary proofs to your employer.  Most employers ask for such evidence in January or February and in case they are not accepting anymore, use them to claim a refund while filing ITR in the next FY.

5. Pay minimum amount to keep investments active

Certain investments such as PPF, NPS requires a minimum amount to be put into the account in each financial year in order to keep them active. Else, the account becomes inactive and one will have to regularise or unfreeze it before making fresh investments. The process of reactivating may be time-consuming and will also involve a penalty.

In order to avoid this, make sure you have invested the minimum amount before the financial year ends. The minimum investment in PPF is Rs 500 while that in NPS is Rs 1000. One should, however, make adequate investments in one’s investments so as to reap its benefits over the long term linked to one’s goal.

6. Link PAN with bank account

Although most of the bank accounts are already linked with respective PAN of the account holders, the income tax department had issued a statement that for refunds, linking of PAN with bank accounts must be ensured. “If you have refunds then link PAN with the bank account to get refunds into your bank accounts directly as the department will issue only E-Refunds from 1st March 2019.

7. Aadhaar PAN linking

Anyone holding PAN needs to ensure that it is linked to one’s Aadhaar number. In an advisory, CBDT had stated that “Constitutional validity of Aadhaar has been upheld by the Supreme Court of India in September 2018. Consequently, in terms of Section 139AA of Income Tax Act, 1961 and order dated June 30, 2018 of the Central Board of Direct Taxes, Aadhaar PAN linking is mandatory now which has to be completed till March 31, 2019, by PAN holders requiring the filing of ITR.”

8. Submit Form 15G / Form 15H to tax deductors

In case you have bank fixed deposits, the income is subject to TDS if the interest earned is more than Rs 10,000 in a financial year. However, by submitting Form 15G / Form 15H to the banker, there will not be any such TDS deducted from the income.  “These forms should be submitted before 31st March 2019 so that no TDS is deducted by the banks if the income is not taxable,” says Gupta. Form 15H  is for individual who is of the age of sixty years or more while Form 15G is for all others for whom the total income will not exceed the maximum amount which is not chargeable to income-tax.  If you had already submitted at the start of the FY, be ready to repeat the exercise in the first month of next FY as well.

Jio V Airtel V Idea V Vodafone: Top postpaid plans under Rs 500

Prepaid plans are cheap. You don’t have to pay more than 250 to get a good data and voice calling plan. But how much is enough for a postpaid plan? There are plans under Rs 200 also but there are more options when you increase the price limit to Rs 500.

Choosing the best postpaid plans from the vast sea of plans and offers is one tough task today. Reason being there are so many plans launching everyday and each being so good that it is hard to choose the best out of the lot.

Therefore, the best way to choose is by setting your priorities. By this we mean that you should decide what is more important for you- data or calls. There are plans that focus more on internet data while there some other plans that place calling at the forefront.

There is a third way also – a balanced plan that has both data and calling benefit in an appropriate amount. These plans are less in number.

Prepaid plans are cheap. You don’t have to pay more than 250 to get a good data and voice calling plan. But how much is enough for a postpaid plan? There are plans under Rs 200 also but there are more options when you increase the price limit to Rs 500.

Here are some of the best postpaid plans that you can get under Rs 500:

Jio Rs 199 postpaid plan: Quite new in the postpaid family is this Jio’s new Rs 199 postpaid plan that offers 25GB high speed data and thereafter Rs 20 per gb. The voice calls are free and unlimited SMS. You get complimentary subscription to Jio apps for one bill cycle.

Vodafone Rs 299 postpaid plan: Vodafone has launched a new postpaid plan called RED Basic plan. Priced at Rs 299, the plan offers 20GB of 3G/ 4G data, unlimited voice calls, free roaming, 100 SMS messages and data roll over up to 50GB. You also get subscription to Vodafone Play for 12 months.

Vodafone Rs 399 postpaid plan: You get 40GB data along with data rollover facility, unlimited local and STD calls, free national roaming, and one year free subscription to Vodafone Play and Amazon Prime.

Vodafone Rs 499 postpaid plan: You will get 75GB data with data rollover facility, unlimited local and STD calls, free national roaming, Mobile shield and one year free subscription to Vodafone Play and Amazon Prime.

Airtel Rs 399 postpaid plan: Airtel offers unlimited calling, free roaming and 20GB data with roll over and Wynk music subscription for one billing cycle.

Airtel Rs 499 postpaid plan: Airtel offers 40GB data with rollover, unlimited local and STD calls, free roaming calls, Wynk music subscription, Airtel TV subscription, handset protection and 40GB data with roll over facility. You also get Amazon Prime one year subscription.

Idea Rs 389 postpaid Nirvana plan: Idea Rs 389 offers 20GB of high speed data with a carry forward limit of up to 200GB,unlimited local, STD and roaming voice calls, 3000 free monthly SMSes and free subscription of Idea movies, music and games for 12 months.

Idea Rs 499 postpaid Nirvana plan: Idea offers 40GB of high speed data with a carry forward limit of up to 200GB, unlimited local, STD and roaming voice calls. You also get 3000 free monthly SMSes, Idea phone secure subscription of four months, music, movies and games for 12 months and magazines for four months.

BSNL Rs 399 postpaid plan: BSNL offers unlimited local and STD voice calls and 30 GB of data, for one month at Rs 399.

No, OTP is not surefire protection against online banking fraud

One-time password (OTP), a commonly used two-factor authentication, is considered an effective deterrent against criminals trying to steal money from your bank account through online transaction. Not any more.

There has been a large number of cases in which criminals duped bank customers into revealing OTP or accessed it by hacking the smartphone. But now they have found another way to bypass the OTP deterrent — by requesting your bank to change your phone number linked to your bank account. A criminal can just walk into a bank, impersonate you, request a change in your registered mobile number and use the new connection to receive OTPs for transactions.

A resident of Janakpuri in Delhi has been duped by criminals who withdrew Rs 11.5 lakh from his current account recently in the same manner, according to a TOI report.

According to police, on August 31, two persons arrived at a bank and one of them impersonated the account holder. They requested a change in the registered mobile number and filled in the prescribed form. Once the new mobile number was registered, they carried out online transfers from the victim’s account using the OTPs sent to the new phone number. The Rs 11.5 lakh withdrawn in this manner was transferred to six different accounts held in a bank in Dwarka and then withdrawn through ATMs and cheques. After the crime, the mobile phone on which the OTPs were sent was switched off.

Police scanned footage of CCTV cameras in the bank and got the bank employees to give details of the accounts used in the fraudulent transactions. Police tracked one of the criminals to Jharkhand through technical surveillance. The role of bank employees is also being probed.
Impersonation is a quick and simple way to carry out an OTP fraud. Another way criminals can dupe a bank customer is to contact mobile operator with fake identity proof and get a duplicate SIM card. The operator deactivates the original SIM and the criminals generate OTP on the new number and conduct online transactions.

Provident Fund (PF) Online Nomination: How To Submit Details, Other Rules Here

Retirement fund body Employees’ Provident Fund Organisation (EPFO) allows subscribers to submit their Provident Fund (PF) account’s nomination details online via its official portal- unifiedportal-mem.epfindia.gov.in. Employees’ Provident Fund (EPF) is a mandatory contribution from every employee towards his or her retirement savings. According to EPFO’s portal- it is important to nominate members to the EPF account. Then only the nominated members can withdraw the EPF savings in the event of subscribers’ sudden demise. Subscribers can nominate more than one nominee and also fix the percentage of sharing among all such nominees.

To avail EPFO’s online nomination facility, subscribers must have an active UAN (Universal Account Number). Also, Aadhaar details should have been seeded to subscribers’ EPF account.

Here are the steps to submit PF account’s nomination details online:

Step 1: Open EPFO portal – unifiedportal-mem.epfindia.gov.in and login by using your UAN and password

Step 2:  Click on ‘Manage’ tab and then click on e-nomination option

nsk962s8

Step 3: Your details like UAN, name, date of birth, gender etc., are displayed. Provide your ‘current and permanent address’ details here. Click on save

jqude9s

Step 4:  Now, click on ‘yes’ to update family declaration

Step 5: Go to ‘add family member(s)’ and add the details of your family members whom you want to nominate. Here, you need to enter the names, date of birth, relation and address of the nominee. You can even add more than one nominee by clicking on ‘adding the row’. In case of minor as a nominee, you need to assign a guardian

vqeq8he

Step 6: Go to ‘nomination details’ and declare the total amount of share among your nominees. In case, you would like to nominate only one member of your family as your nominee then you can declare 100 per cent as the share

6lhvh4t

Step 7:  Click on ‘Save EPF nomination’ button

Step 8: Now, click on e-sign button to generate OTP, which will be sent to the mobile number that is linked to the Aadhaar card. The Aadhaar e-sign facility helps in approving the e-nomination form. Enter the OTP

hnj6sbd

With this, the e-nomination gets registered with the EPFO. There is no need to send any physical document to the employer or ex-employer after the online nomination is done.

News Org Code in javascript

This plugin enables PHP code in pages, posts and everywhere you can place a Gutenberg block 🔥. Attention: The update to 3.0.0 is a breaking change that removes the [php_everywhere] short code and widget. Run the upgrade wizard from this plugin’s settings to help you migrate to Gutenberg blocks.

Why Does Your Website’s Speed Matter?

Introduction

Nothing is more frustrating than a slow website. Not only it is bad for end users, but it’s also very bad for website owners. In the day and age, we live in, having a website is a necessity not only for businesses but also for anyone who wants to share useful information with the world. Whether they are photographers trying to showcase their work, artists trying to make their voice heard, stay-at-home moms, providing DIY tutorials or teachers who want to share their knowledge, it’s of crucial importance to have a website that’s effective. One of the key factors that make a website effective is speed.

Contact for Speedup your Website. Email : adityaypi@yahoo.com, Mobile : +91-9555699081

Why Does Your Website’s Speed Matter?

Speed can make or break a website. It affects your traffic, page views, conversions, sales, and your overall reputation. By making it faster, you can improve your business or your fan base and help it grow. Studies have shown:

  • 47 percent of people expect a website to load in less than two seconds.>
  • 40 percent of people are very likely to leave a website if it takes more than three seconds to load.

Therefore, website speed plays a very important role in making your business successful. It should be one of your top priorities if you want to stand out from your competition. By speeding up your website, not only will you yield positive results in terms of page views and conversions, but you will also provide your visitors with a better user experience.

A great user experience is a key to building a strong customer base and building a strong brand. If your website takes forever to load, then what’s the point of having an awesome website in terms of its other elements, when people aren’t even likely to stay and check it out? Therefore, by not making sure your website loads fast, you risk losing a lot of customers or followers and, thus, a lot of revenue.

Moreover, your website speed is very important for your SEO. If your website loads fast, your ranking in search engines will be higher. This is because Google prefers fast websites, and it rewards them by ranking them higher in search engine results. Apart from speed, the user experience is another factor in Google’s ranking algorithm. So, by boosting the speed of your website and improving your user experience, you will eventually improve your SEO ranking.

As a result, you’ll get higher traffic and attract more quality leads that you can convert into customers, ultimately increasing your sales and generating more revenue.

How to Test Your Website’s Speed?

  • PageSpeed Insights is Google’s free tool for testing your website speed and it is very easy to use. All you need to do is enter the URL of your website and the tool will analyze its content and generate suggestions on how to make your website faster.
  • Pingdom is also a very useful tool that not only tests your website speed, but also reviews and grades your website’s performance. It also tracks your website’s performance history, so you can have insight into any potential changes regarding your website speed.
  • YSlow is a tool that tests your website speed and offers advice on how to improve it. It can also provide you with a Chrome extension for checking the speed of your website.

15 Ways to Speed Up Your Website

There are many ways to speed up your website, making it truly effective and successful. Following are several of the easiest and most effective ways to speed up your website and make your every effort pay off in the long run.

Upgrade Your Web Hosting Plan

Many people opt for cheap web hosting plans when they are first creating a website, so they choose shared hosting. Over time, they provide more content and their websites grow, ultimately slowing down. If that is your case, the best choice would be to upgrade your web hosting plan. Upgrading your web hosting plan is the simplest and easiest way to improve the speed of your website.

If you have shared hosting, you should either move to a VPS or dedicated option. Either way, you will notice a significant difference in your website speed. Making a decision between the two options depends on your own business needs, so make sure you explore both of the options carefully and thoroughly.

Here’s just a quick note on both of them. VPS (Virtual Private Servers) hosting is perhaps the best option to go for, since it uses multiple servers for content distribution (sometimes even hundreds of servers). It is also a scalable solution and appeals most to small and medium businesses, as well as bloggers.

On the other hand, with dedicated servers, you get full control, since you get dedicated resources. You don’t have to share RAM, CPU, bandwidth or anything else since all of the resources are dedicated only to you. Also, the bandwidth limits are higher but, since you don’t have multiple computers, this hosting option is a lot less flexible. However, it is much more expensive than VPS hosting.

Enable Browser Caching

Enabling caching can improve your website speed significantly and give visitors to your site a more rewarding user experience. Caching refers to the process of storing static files, such as HTML documents, media files, images, CSS and JavaScript files, for easier and faster access, so that the database does not have to retrieve each and every file every time there is a new request. The more requests are being made to your server, the more time it will take for your website to load.

When someone visits your website, the elements on the web page they are trying to access are automatically downloaded and stored on their hard drive in a cache (temporary storage). That way, the next time they visit your website, their browser will load the requested web page very quickly, without having to send an HTTP request to the server again.

However, caching works for repeat visitors only, since, obviously, first-time visitors don’t have a cached and stored version of your website. Nevertheless, enabling full caching for your website can reduce your page load time from 2.4 to 0.9 seconds. This is due to the fact that there may be 30 or more different components that need to be stored in the user’s cache the first time they visit your website, but only a few components need to be downloaded for subsequent visits.

Depending on the website platform you’re using, there are different ways to enable browser caching. For example, if you’re using WordPress, the easiest way to enable caching is to install a plugin. The best WordPress caching plugins are W3 Total Cache, which is the most popular performance plugin, and WP Super Cache, which is best for websites with high traffic and underpowered servers.

If you are using Drupal as your CMS, you should use the Varnish Cache software for leveraging browser caching. If Joomla is your CMS, you can enable browser caching in your Joomla dashboard: go to System > Global configuration and click on the System tab. You’ll see the Cache label under the Cache settings label, where you click to open the drop-down menu and choose the option ON – Conservative Caching from the list. Click save and go to Extensions > Plugin Manager, where you can enable the System – Cache plugin.

You can also enable browser caching at the server level, that is, integrate caching into your server-side scripting, which is something your web developer can help you with.

Static resources that are stored in a cache should have a caching lifetime of at least one week. You can set that by adding Expires Headers and setting them to a minimum of one week and a maximum of one year. The best option is to set late expiry times for static resources that aren’t updated frequently and short expiry times for resources that are updated on a regular basis.

Expires Headers tell the browser whether a particular file needs to be requested from a server or from the browser’s cache. They also tell the browser how long it needs to store those files in the cache so that they’re not downloaded again during subsequent visits.

Enable Gzip Compression

If you’ve ever compressed files on your computer as ZIP files, then you must know how much that method can reduce the size of files. Gzip compression works exactly the same, except with website pages. It’s the best and most effective compression method that can considerably minimize HTTP requests and reduce response time, sometimes by as much as 70 percent.

By enabling Gzip compression, your website’s files will automatically be compressed in a ZIP file. This will significantly reduce their size and boost the speed of your website. A lot of bandwidth will be saved and the page load time of your website will be improved. When someone visits your website, the compressed files will be unzipped automatically so the content can be accessed.

You can install Gzip compression on your website with the use of a proper compression plugin for your CMS, but you can also very easily do it manually. There are two ways to manually add Gzip compression to your website. The first one is to add the following code to your .htaccess file if you want to compress text, JavaScript, HTML, CSS or XML:

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

If you want to compress certain file types by extension, add the following code to your .htaccess file:

<files *.html>
SetOutputFilter DEFLATE
</files>

The second way to manually add Gzip compression to your website is to add the following code to the top of your HTTP or PHP page:

<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip')) ob_start("ob_gzhandler"); else ob_start();?>

Remove Unnecessary Plugins

Every plugin you add requires resources to be able to run. However, more resources lead to a slower website. If you have some plugins installed that you no longer use or find unnecessary, you should deactivate and delete them. Not only can too many plugins slow down your website, but they can also cause security issues and crashes.

You can easily identify which plugins are slowing down your website by selectively disabling them and then measuring server performance. If you created a website using WordPress as your CMS, for instance, you can install the P3 (Plugin Performance Profiler) plugin, which is the best and most useful diagnostic plugin available.

This plugin will show you exactly which plugins are affecting the performance of your website so that you can decide whether they’re unnecessary and should be removed or confirm they’re providing you with actual benefits. If the latter happens to be your case, you can try and keep them only on the pages on your website where you think they are absolutely necessary. You may also want to find alternate plugins to replace them or even code the content of such plugins into the theme of your website.

By removing unnecessary plugins, you can considerably improve your page load time and speed up your website. However, you should know that when it comes to plugins, it’s not just a matter of the number of plugins. You can have 50 plugins and still have a faster website than someone who installed 10 plugins on their site. The number of plugins is important, but there’s something in their quality as well. For instance, social sharing plugins can greatly affect your page load time, so you may want to consider embedding social media buttons into the source code of your website theme.

Therefore, you should avoid plugins that load a lot of scripts and a lot of styles, perform many remote requests and overwhelm every page on your website by adding a lot of database queries. Of course, plugins contribute to the functionality of your website and there are quite a lot of them that can help you improve it. But you should definitely keep only those you find absolutely necessary.

Note: If you’re using Drupal or Joomla, for example, you have no plugins to deal with in the first place. So you can speed up your website by disabling modules or adding speed optimization extensions. The best advice for Drupal is to never run more than 50 modules. Only run those that are absolutely necessary for the functionality of your website.

As for Joomla, make sure you check out the following extensions, as each of them can boost your website speed: JQuery EasyLLFJJavascript Async and Defer and ScriptsDown.

Minimize HTTP Requests

Websites can be slow because of too many HTTP requests. When someone visits your website, they request certain files. Their web browser requests those files from your server by using the HTTP protocol. These files include HTML files, CSS and JavaScript files. If you have a lot of them, there will be a lot of HTTP requests and your website will ultimately get slowed down.

This is why you should minimize HTTP requests. There are some excellent ways to do this.

  • Combine CSS, JS scripts and HTML files together.
  • Use CSS instead of images whenever possible.
  • Reduce the number of elements on every web page.
  • Install a caching plugin.
  • Reduce redirects, which create additional HTTP requests to your server and increase your page load time.

For instance, if your website is responsive, mobile users that visit your website will be redirected to the responsive version of it. You can take two actions to ensure those kinds of redirects don’t slow down your website. You can either set up an HTTP redirect to directly send mobile users to a device-specific URL without any additional redirects or set up a JavaScript redirect to identify a mobile-equivalent URL and redirect mobile users to it. However, the latter option can cause latency, because a web page needs to be downloaded first on the client side of redirection before JavaScript can be executed and redirection can take place.

Enable HTTP Keep-Alive

When your web server receives an HTTP request from your website visitor’s browser, that is, when a visitor requests a certain file, the browser asks the server for a permission to download the file. It does so for each and every file individually. This takes up a lot of bandwidth and memory, not to mention that it uses more processing power. Eventually, it causes a lot of load on your server and slows down your website.

You can make your website faster by enabling HTTP Keep-Alive, which will create a single open connection for multiple file requests to your server, thus greatly speeding up your website. Simply put, the server tells the browser it can download multiple files at the same time, without putting too much load on the server. When the number of connections to your server is limited, a lot of bandwidth will be saved.

You can enable HTTP Keep-Alive by copying and pasting the following code into your .htaccess file:

<IfModule mod_headers.c>
Header set Connection keep-alive
</IfModule>

Minify JavaScript and CSS Files

If you have a ton of JavaScript and CSS files on your website, there will be a lot of HTTP requests when your website visitors want to access certain files. Since their web browser will treat those files individually, those numerous HTTP requests will considerably slow down your website.

While minimizing (minifying) HTTP requests and enabling HTTP, Keep-Alive can greatly improve your website speed. You should consider minifying JavaScript and CSS files since this can also significantly speed up your website. By putting all JavaScript files into one single JavaScript file, as well as putting all CSS files into one CSS file, you will reduce their number. This will reduce the number of HTTP requests and speed up your website.

There are many minifying tools you can try, but you may want to start with a free and very easy-to-use WillPeavy plugin that can help you quickly minify HTML, CSS and JavaScript files. BWP Minify (Better WordPress Minify) is also a great plugin that can help you combine and minify your JavaScript and CSS files, but it’s a plugin for WordPress only.

Optimize Your Images

Images take up a lot of bandwidth. When they’re not optimized, meaning they are large in size, they use a lot of server resources and take more time to load. When your images are not optimized, your website can be much slower.

Therefore, consider reducing the size of your images without negatively affecting their quality. You can accomplish this by using a plugin that can compress your images and ensure they don’t lose quality in the process.

If you use WordPress, try WP Smush, a plugin that will automatically compress your images the moment you upload them to your media library. On the other hand, if you use Drupal or Joomla as your CMS, check out Kraken, which is also a great tool for compressing images.

Furthermore, consider using CSS sprites, as they can also greatly speed up your website. A sprite is one file that contains all of your images. You can create sprites with the use of CSS, which can specify coordinates and hide everything in an image except the section you need. Therefore, all of your images will be put in one single place and your web pages will load much faster since one big image can load faster than a lot of small images.

When you optimize your images, apart from their size, you need to focus on their format and the src attribute, which is the URL of the image. You should stick with the JPEG format, while PNG is also good, but not fully supported by older browsers.

Another Image compressing tool : Click here

This tools allows you to compress both jpeg and png files and each picture can be up to 50 MB in size!

Compress your PNG/JPG files by up to 80% and retain full transparency

When it comes to the src attribute, you need to make sure the code is right. Avoid empty image src codes. Namely, the code for an image in HTML includes the following:

<img src=””>

When there is no source inside the quotation marks, the browser makes a request to the directory of the page or to the page itself, which can cause a lot of load on your servers and even corrupt your data. Therefore, make sure you always include the “src attribute” with a valid URL.

Change Your Website Theme

The theme of your website can also affect your website speed. No matter how good your server configuration is, if your website theme has a complex code, your website will load sluggishly. It’s not uncommon, especially in WordPress, to change nothing but your website’s theme, only to find there’s a big increase in page load time.

Therefore, consider changing your website theme and make performance one of the priorities when choosing a theme, instead of only looking at aesthetics. You can check the page speed of a particular theme’s demo with the help of one of the tools for testing website speed so you can see how quickly the theme runs.

Use a CDN

CDN (Content Delivery Network) is a network of multiple servers located around the world that deliver web content to end users according to their geographic location. A CDN can host the static files of your website in order to deliver them more efficiently and reduce bandwidth and your server load.

With a CDN, the requested web content will be delivered to end users much quicker, since a CDN will use a server closest to users to deliver the files they request. As a result, not only will there be no latency, but your website will also become much faster. This is due because your visitors will access your cache instead of requesting files directly from your server.

Therefore, by using a CDN, you’ll save a lot of bandwidth and significantly improve your page load time and website speed. You can store your CSS and JavaScript files on a CDN, as well as images, videos, PDFs and other types of uploaded content.

Using a CDN can be very expensive, but it comes with quite a lot of benefits, so it’s worth every dime, especially if you happen to use a lot of bandwidth. So, if you have a large website and a lot of visitors, a CDN is your way to go.

Reduce External Scripts

External scripts that you add to your website in the form of JavaScript codes make HTTP requests every time your web pages load. As you already know, this slows down your website. Those external scripts can be external commenting systems, pop-up boxes, external fonts, website analytics services, social media boxes, such as Facebook “like my page” box, and many more.

Although you should certainly not eliminate all your external scripts, you should reduce them, as that will help you speed up your website. You can use Pingdom, for instance, to check which external scripts are taking the longest to load and, if they happen to be unnecessary, you can eliminate them.

If you embed videos and other multimedia files from websites which happen to be slow, your website speed can be negatively affected. To improve your page load time, make sure you request external files only from fast and reliable websites. You may also want to consider limiting the number of external requests your website makes altogether.

Fix Broken Links

Broken links in your content cannot slow down your website, but they can greatly affect user experience, so you should pay close attention to all of them. However, broken links in your CSS, JavaScript and image URLs can negatively affect your website speed. Scan your links on a regular basis and fix broken ones as soon as you notice them.

Broken links are most commonly found in image source files, which happens when the URL is wrong. These links can easily be overlooked, especially when the size of a certain image is defined as very small. When there’s a broken link in your image, that is, when a 404 error appears, that broken link creates a wasted response from an HTTP request, which makes your website slower. The browser attempts to download an image that’s not available, so your web page spends more time trying to download the image, slowing down your website.

Broken links can also be found in the CSS link tags in the head of your HTML documents. Just as with image files, if your CSS file is not where you have linked to, an HTTP request will result in a useless response and it will return with a 404 code. It’s especially important to regularly check for broken links if you use a lot of external CSS files since they can be moved and result in a 404 error.

If there’s a broken link in the JavaScript source URL, your website can also be slowed down as with image source files and CSS links. But the browser may also try to interpret JavaScript and cause not only increased download time, but also bad script interactions. When the browser attempts to load a 404 page instead of JavaScript, all the other downloads stop until the loading of a 404 page is complete. This is why you should always put your JavaScript at the bottom of your HTML documents (right before the closing </body> tag), which is especially important when there are broken links involved.

You can check for broken links with WordPress Broken Link Checker for free.

However, sometimes broken links aren’t caught by broken link checkers, so the best way to check for them is to regularly look at your server logs. There are several tools you can use to scan for URLs that are getting 404 errors to see which pages are causing them and then take action to fix them immediately.

Disable Hotlinking

If you don’t disable hotlinking, you allow people to use the content that’s hosted on your server for their own websites. By allowing them to practically use your servers and your content for their websites, you’ll get a lot of server load for no reason.

This is why you should disable hotlinking and prevent people from stealing your server resources. However, in order to do that, you need to add the necessary code to your server. There are some tools that can help you generate the right code, but your web hosting provider can also help you with this.

Hotlinking usually involves images and other multimedia files, which generally take up a lot of bandwidth. Therefore, if you run a website with few to no images, disabling hotlinking will actually not affect your website speed.

Speaking of hotlinking, you should not just disable it, but you should avoid it altogether. Instead of linking to images on someone’s website, load them on your own server. You may think that image links will save you a lot of bandwidth, but they can actually slow down your website if the website with the image you linked to is slow and unreliable. What’s more, they may experience downtime or crash, so always load every image on your own server before you link to them.

Use a Reliable CMS

A CMS (Content Management System) is critical to your website’s functionality and performance. The best and most reliable CMS you can use is definitely WordPress, but there are also other excellent CMSs, such as Drupal and Joomla. If you use any of these as your website platform, you’ll do right by your site’s performance.

However, if you use some other less popular CMS or even something that you built on your own, you risk having a website that is very slow. In order to avoid this, make sure you conduct thorough research and choose a CMS that’s reliable and best suits your needs.

What’s also vital when it comes to your CMS is to regularly check for the latest updates. Make sure your website’s scripts are up-to-date since new versions are constantly popping up with the goal of improving websites and making them faster. Therefore, upgrade your website’s scripts on a regular basis. But always make sure you have your backup files in place first.

Optimize Your Database

Optimizing your database is yet another very effective way to speed up your website. This is something you should do on a regular basis, especially if you use WordPress or some other CMS that relies a lot on database usage.

When you use such a CMS or even some complex plugins, the data in your database increases and your website becomes slower. This is especially true for plugins that save user data, statistics and logs, as they can take up a lot of data storage. Before you know it, your database will become filled with trackbacks, pingbacks, post revisions, trash items and unapproved comments, which can make your website significantly slower.

Therefore, clean your database on a regular basis, but always make sure you back up your files first. Never do anything with your database before backing it up. There are many plugins that can help you optimize your database, so do your research and find proper ones for the CMS you use.

used GCM(Google Cloud Messaging) for sending the push notification to Android devices,

Initially, we have used GCM(Google Cloud Messaging) for sending the push notification to Android devices, and now Google has been launched Firebase Cloud Messaging(FCM), the newer version of GCM with more features.

Basically, FCM is new Cloud Messaging Services by Google under the Firebase brand, which inherits the GCM’s core infrastructure, plus SDKs and new features to make Cloud Messaging development easier.

This tutorial is useful for the PHP developers who want to send FCM(Firebase Cloud Messaging) notifications by using PHP.

To send GCM messages you basically required two things:

  • Authorization key
  • Device Token

You can get Authorization key(api_key) available in Firebase Console -> Project Settings -> CLOUD MESSAGING -> Server key, and device token you can get at the time of registering or logging by the android users through API.

PHP Function to Send Push Notification by Using FCM(Firebase Cloud Messaging)

function push_notification_android($device_id,$message){

    //API URL of FCM
    $url = 'https://fcm.googleapis.com/fcm/send';

    /*api_key available in:
    Firebase Console -> Project Settings -> CLOUD MESSAGING -> Server key*/    $api_key = 'AAAAKZLje1I:APbGQDw8FD...TjmtuINVB-g';
                
    $fields = array (
        'registration_ids' => array (
                $device_id
        ),
        'data' => array (
                "message" => $message
        )
    );

    //header includes Content type and api key
    $headers = array(
        'Content-Type:application/json',
        'Authorization:key='.$api_key
    );
                
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields));
    $result = curl_exec($ch);
    if ($result === FALSE) {
        die('FCM Send Error: ' . curl_error($ch));
    }
    curl_close($ch);
    return $result;
}

Array Functions

  • array_change_key_case — Changes the case of all keys in an array
  • array_chunk — Split an array into chunks
  • array_column — Return the values from a single column in the input array
  • array_combine — Creates an array by using one array for keys and another for its values
  • array_count_values — Counts all the values of an array
  • array_diff_assoc — Computes the difference of arrays with additional index check
  • array_diff_key — Computes the difference of arrays using keys for comparison
  • array_diff_uassoc — Computes the difference of arrays with additional index check which is performed by a user supplied callback function
  • array_diff_ukey — Computes the difference of arrays using a callback function on the keys for comparison
  • array_diff — Computes the difference of arrays
  • array_fill_keys — Fill an array with values, specifying keys
  • array_fill — Fill an array with values
  • array_filter — Filters elements of an array using a callback function
  • array_flip — Exchanges all keys with their associated values in an array
  • array_intersect_assoc — Computes the intersection of arrays with additional index check
  • array_intersect_key — Computes the intersection of arrays using keys for comparison
  • array_intersect_uassoc — Computes the intersection of arrays with additional index check, compares indexes by a callback function
  • array_intersect_ukey — Computes the intersection of arrays using a callback function on the keys for comparison
  • array_intersect — Computes the intersection of arrays
  • array_key_exists — Checks if the given key or index exists in the array
  • array_key_first — Gets the first key of an array
  • array_key_last — Gets the last key of an array
  • array_keys — Return all the keys or a subset of the keys of an array
  • array_map — Applies the callback to the elements of the given arrays
  • array_merge_recursive — Merge one or more arrays recursively
  • array_merge — Merge one or more arrays
  • array_multisort — Sort multiple or multi-dimensional arrays
  • array_pad — Pad array to the specified length with a value
  • array_pop — Pop the element off the end of array
  • array_product — Calculate the product of values in an array
  • array_push — Push one or more elements onto the end of array
  • array_rand — Pick one or more random keys out of an array
  • array_reduce — Iteratively reduce the array to a single value using a callback function
  • array_replace_recursive — Replaces elements from passed arrays into the first array recursively
  • array_replace — Replaces elements from passed arrays into the first array
  • array_reverse — Return an array with elements in reverse order
  • array_search — Searches the array for a given value and returns the first corresponding key if successful
  • array_shift — Shift an element off the beginning of array
  • array_slice — Extract a slice of the array
  • array_splice — Remove a portion of the array and replace it with something else
  • array_sum — Calculate the sum of values in an array
  • array_udiff_assoc — Computes the difference of arrays with additional index check, compares data by a callback function
  • array_udiff_uassoc — Computes the difference of arrays with additional index check, compares data and indexes by a callback function
  • array_udiff — Computes the difference of arrays by using a callback function for data comparison
  • array_uintersect_assoc — Computes the intersection of arrays with additional index check, compares data by a callback function
  • array_uintersect_uassoc — Computes the intersection of arrays with additional index check, compares data and indexes by separate callback functions
  • array_uintersect — Computes the intersection of arrays, compares data by a callback function
  • array_unique — Removes duplicate values from an array
  • array_unshift — Prepend one or more elements to the beginning of an array
  • array_values — Return all the values of an array
  • array_walk_recursive — Apply a user function recursively to every member of an array
  • array_walk — Apply a user supplied function to every member of an array
  • array — Create an array
  • arsort — Sort an array in reverse order and maintain index association
  • asort — Sort an array and maintain index association
  • compact — Create array containing variables and their values
  • count — Count all elements in an array, or something in an object
  • current — Return the current element in an array
  • each — Return the current key and value pair from an array and advance the array cursor
  • end — Set the internal pointer of an array to its last element
  • extract — Import variables into the current symbol table from an array
  • in_array — Checks if a value exists in an array
  • key_exists — Alias of array_key_exists
  • key — Fetch a key from an array
  • krsort — Sort an array by key in reverse order
  • ksort — Sort an array by key
  • list — Assign variables as if they were an array
  • natcasesort — Sort an array using a case insensitive “natural order” algorithm
  • natsort — Sort an array using a “natural order” algorithm
  • next — Advance the internal pointer of an array
  • pos — Alias of current
  • prev — Rewind the internal array pointer
  • range — Create an array containing a range of elements
  • reset — Set the internal pointer of an array to its first element
  • rsort — Sort an array in reverse order
  • shuffle — Shuffle an array
  • sizeof — Alias of count
  • sort — Sort an array
  • uasort — Sort an array with a user-defined comparison function and maintain index association
  • uksort — Sort an array by keys using a user-defined comparison function
  • usort — Sort an array by values using a user-defined comparison function