This content originally appeared on Bits and Pieces - Medium and was authored by Dulanka Karunasena
Can We Remove Cookie Banners From Our Websites?
An HTTP Cookie is a small collection of data stored on your computer by the browser whenever you visit a website. Although these Cookies make your browsing experience more smooth and easier, there are claims that Cookies are intruding on users’ privacy.
Recently GitHub removed all non-essential Cookies from their website, claiming that they are committed to protect developer privacy.
As developers, we must be aware of when to use Cookies and the rules and regulations governing them.
In this article, I will discuss Cookie law, why GitHub removed Cookies, and what can we do to remove Cookie banners from our websites if needed.
Why We Need Cookies?
Before getting into details, let’s see why we need Cookies in the first place.
Traditionally Session management is the most important usage of Cookies in a website. Cookies maintain the authentication state and a reference to the user who viewed the website.
In simple terms, Cookie enables session management storing a reference to the session in user’s browser.
Besides, Cookies can be also used to track user activities performed on a website.
If you use third-party analytics tools such as Google Analytics or embed third-party content in your website, they use Cookies to track visitor activities. For example, Facebook and Google use this data to deliver targeted ads.
These third-party Cookies can interfere with user’s privacy, and that’s why there are rules and regulations to address these issues, which we will look into next.
Tip: Share your reusable components between projects using Bit (Github).
Bit makes it simple to share, document, and reuse independent components between projects. Use it to maximize code reuse, keep a consistent design, speed-up delivery, and build apps that scale.
Bit supports Node, TypeScript, React, Vue, Angular, and more.
Cookie Law
Cookie Consent Law, aka Cookie Law, was introduced in 2002 and amended in 2009 by the European Union (EU).
At present, this law comes under the General Data Protection Regulation (GDPR), which was introduced by the EU in 2018.
This law should be complied with by websites targeting EU citizens. The US also introduced a similar law under California Consumer Privacy Act (CCPA).
All these laws imply that websites should explicitly describe the nature of Cookies used and get the user’s consent before storing Cookies. But, they do not apply to Cookies that are essential for the site to function.
This law is also applicable to data stored in local storage too. Website owners should place a Cookie consent banner to comply with this law.
Why GitHub Removed Cookies?
As I mentioned initially, GitHub removed all non-essential Cookie banners from their website, claiming that they need to protect developers’ privacy.
Does that mean GitHub doesn’t use Cookies at all? No. They still use few essential Cookies on their website.
They have removed all third party, non-essential Cookies that force you to display a Cookies banner according to the EU Cookie law we discussed earlier. They also claim that they haven’t used Cookies to display ads or track users across other sites. Below image shows what are the essential Cookies used by GitHub:
In addition to privacy concerns, they highlight that Cookie banners deliver a bad user experience. This worsens when it comes to mobile interfaces because such banners block the site interface and users always have to click buttons to accept or decline them.
Can We Remove Cookies From Our Websites?
I hope you will agree with me if I say Cookie banners are terrible for the user experience, especially when browsing with mobile devices.
In the third quarter of 2020, mobile devices (excluding tablets) generated 50.81 percent of global website traffic — statista.com
This is not something to be taken lightly because mobile devices generate about 50% of web traffic. So can we remove these Cookie banners?
Yes, we can remove Cookie banners from our websites. But we need to be careful of our requirements as well.
Let’s look into some of the steps we can take to remove Cookie banners from our websites.
Avoid using third party web analytics tools
Third-party analytics tools such as Google Analytics use Cookies to track user activities. Refraining from using such tools will allow us to remove Cookie banners but at the expense of losing the analytics data.
However, suppose you use the session Cookie to track user behavior across websites. In that case, you will still need to show a Cookie banner indicating the purpose of collecting these data to comply with the law.
Do not embed third-party components
If you embed elements from external sites, those sites can store Cookies via your website. For example, embedding Facebook Like button, chat plugin, or placing Google Ads will allow Cookies from Facebook and Google to crawl to your website user’s browser.
Implementing the above steps does not degrade the basic functionality of a website. But looking from a site owner’s perspective, it will restrict some of their benefits such as advertising, access to robust analytics data, and publicity.
Final Thoughts
There could be Cookies essential for its core functionalities in a website, and on the contrary, there could be Cookies that are a threat to a user’s privacy, such as third party Cookies.
The Cookie Law was introduced to safeguard users from harmful Cookies. It insists that developers place a Cookie consent banner to get acceptance from users before placing such Cookies.
Many developers identified this as a hindrance to the basic user activity in a website. That’s why GitHub also took this matter seriously and removed Cookie banners from their site. We could also implement a similar strategy. But it will come at the expense of some useful features, as discussed above.
So, I will wrap up this article leaving you folks to decide whether or not to use the irritating Cookie banner on your website! Thank you for the read, and keep up the good work! ?
Learn More
- Why Using Tokens and Cookies together is Better for Web Apps
- Browser Storage Options and Their State in 2021
- SessionStorage and LocalStorage: A UX/Security Comparison
GitHub Removed Cookie Banners: Why Can't We? was originally published in Bits and Pieces on Medium, where people are continuing the conversation by highlighting and responding to this story.
This content originally appeared on Bits and Pieces - Medium and was authored by Dulanka Karunasena
Dulanka Karunasena | Sciencx (2021-02-18T23:30:47+00:00) GitHub Removed Cookie Banners: Why Can’t We?. Retrieved from https://www.scien.cx/2021/02/18/github-removed-cookie-banners-why-cant-we/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.