Christian Schou
  • Forside
  • Blog
    • Programmering
      • C#
      • PowerShell
      • Python
      • SQL
    • WordPress
      • Guides
    • Cloud
    • Boligautomatisering
      • Home Assistant
        • Node-Red
    • Career
  • Services
  • Ordbog
  • About
No Result
View All Result
Christian Schou
  • Forside
  • Blog
    • Programmering
      • C#
      • PowerShell
      • Python
      • SQL
    • WordPress
      • Guides
    • Cloud
    • Boligautomatisering
      • Home Assistant
        • Node-Red
    • Career
  • Services
  • Ordbog
  • About
No Result
View All Result
Christian Schou
No Result
View All Result
Home Programmering C#

toast notifications

How to add Toast Notifications in an ASP.NET Core Web App (.NET 6)

by Christian
5. februar 2022
in C#
2

What are toast notifications? I have worked with several web apps and all of them have included lots of functionality where the user interacted with buttons etc… A user asked me if they could get a status message when uploading a file to the server or when the page updated data correctly, with errors, and so on. I picked up the challenge and started searching for NuGet packages to solve this problem. I came across two different projects with the same goal in mind, and in this article, I will show you how to add toast notifications in an ASP.NET Core Web App running on .NET 6.

I won’t be implementing any logic as it will be shown on the default template for ASP.NET Core Web App (with Razor pages). Normally the web application would redirect the user to a new page displaying a simple text depending on the returned response from the server.

This seemed a little outdated to be, but it was working and no one have ever asked to do it in a smarter way, so why touch it? I started searching for alternatives (i know the notifications from other applications I have used before, but I have never made the implementation myself), and then I found these two NuGet packages:

  • NToastNotify – It’s a pacakge containing an abstraction for the server side rendered toast notifications using toast.js or noty.js. It also supports AJAX calls.
  • ToastNotification – An elegant way to implement Toast Notifications in ASP.NET Core Web Applications.

If you are ready, then let’s add some toast notifications to an ASP.NET Core Web App.

Indholdsfortegnelse
  1. What is a Toast Notification?
  2. Add Toast Notifications to ASP.NET Core
    • Implement NToastNofity in ASP.NET Core
      • #1 – Install NToastNotify from NuGet
      • #2 – Register NToastNotify in the Service Container
      • #3 – Add NToastNotify Middleware
      • #4 – Add the NToastNotify component to your layout page
      • #5 – Add your Toast Notifications to the OnGet() method
    • Implement ToastNotification in ASP.NET Core
      • #1 – Install ToastNotification from NuGet
      • #2 – Register ToastNotification in the Service Container
      • #3 – Add ToastNotification Middleware
      • #4 – Add the Notyf component to your layout page
      • #5 – Add your Toast Notifications to the OnGet() method at the Privacy Policy page
  3. Summary

What is a Toast Notification?

I already knew about the Toast name for notifications, but what exactly does that mean? If we check Stackoverflow, there is already a question for this and a brilliant answer by Bramha Ghosh:


A side profile of a woman in a russet-colored turtleneck and white bag. She looks up with her eyes closed.
gravatar.com

“Toast” refers to a UI feature where an event causes a small text box to appear at the bottom of the screen. The behavior seems like a piece of bread emerging from a toaster.

— Bramha Ghosh

In other words, it is a tool for developers to display a message to the user, whenever the user makes an interaction with the application. The toast can contain any kind of information we would like to show for the user, to better inform them about what happened.

The toast notifications were actually born with the Android OS, but due to its genius way of showing a notification inside an application it has emerged to other platforms like ASP.NET Core. Below is a screenshot of how toast notifications can look like:

toast notifications
Toast Notifications

The toast notifications we are going to implement in the demo in this article, will not look like those above. The ones you see in the image above are generated using the JavaScript framework Vue.js.

Add Toast Notifications to ASP.NET Core

The great thing about both NuGet packages I have listed above is that they are very easy to implement in your ASP.NET Core Web application. Let’s go ahead and do that! I won’t be showing how to create a new ASP.NET Core Web App in this tutorial. You can just use the one from the template inside Visual Studio (IDE).

Implement NToastNofity in ASP.NET Core

The first package I will show you is named NToastNotify and is an abstraction of JavaScript Toastr to create toast notifications in ASP.NET Core Projects. Some great features about this package are server-side toast notification rendering and toast notification on AJAX calls (great when using APIs).

#1 – Install NToastNotify from NuGet

To install it in your project, you can use the following ways:

Install-Package NToastNotify
dotnet add package NToastNotify
<PackageReference Include="NToastNotify" Version="VERSION-HERE" />
paket add NToastNotify
// Install NToastNotify as a Cake Addin
#addin nuget:?package=NToastNotify&version=VERSION-HERE

// Install NToastNotify as a Cake Tool
#tool nuget:?package=NToastNotify&version=VERSION-HERE

#2 – Register NToastNotify in the Service Container

Open Program.cs and update the service container to the following:

using NToastNotify;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddRazorPages().AddNToastNotifyNoty(new NotyOptions
{
    ProgressBar = true,
    Timeout = 5000
});

#3 – Add NToastNotify Middleware

In Program.cs add the following line just before the line app.MapRazorPages(); like I have done below:

var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
    app.UseExceptionHandler("/Error");
    // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
    app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.UseNToastNotify();

app.MapRazorPages();

app.Run();

#4 – Add the NToastNotify component to your layout page

Expand the folder Pages and navigate to the Shared folder. Inside here you will find a file named _Layout.cshtml – open this and add the following line at the bottom just before the closing tag for your body: @await Component.InvokeAsync("NToastNotify"). See line 50 below.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - ToastDemo</title>
    <linkcss/bootstrap.min.css" />
    <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
    <link rel="stylesheet" href="~/ToastDemo.styles.css" asp-append-version="true" />
</head>
<body>
    <header>
        <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
            <div class="container">
                <a class="navbar-brand" asp-area="" asp-page="/Index">ToastDemo</a>
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
                        aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
                    <ul class="navbar-nav flex-grow-1">
                        <li class="nav-item">
                            <a class="nav-link text-dark" asp-area="" asp-page="/Index">Forside</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link text-dark" asp-area="" asp-page="/Privacy">Privacy</a>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    </header>
    <div class="container">
        <main role="main" class="pb-3">
            @RenderBody()
        </main>
    </div>

    <footer class="border-top footer text-muted">
        <div class="container">
            &copy; 2022 - ToastDemo - <a asp-area="" asp-page="/Privacy">Privacy</a>
        </div>
    </footer>

    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script src="~/js/site.js" asp-append-version="true"></script>

    @await RenderSectionAsync("Scripts", required: false)
    @await Component.InvokeAsync("NToastNotify")
</body>
</html>

That line will render the necessary view component inside the View. You can actually place it where ever you want inside that file, but I prefer to stick to the bottom in order to keep things organized.

#5 – Add your Toast Notifications to the OnGet() method

For this demo, I will only be adding toast notifications to the OnGet() method inside Index.cshtml.cs, but actually, you can add them to any method you would like and I will also include a few examples below to give you an idea of how that could be accomplished.

First, we have to add NToastNotify to our PageModel for the Index page. The IndexModel is inheriting the PageModel and you can find the .cs file by clicking the little arrow in front of Index.cshtml. Now you have to add the toast notifications, just like I have done below:

using Microsoft.AspNetCore.Mvc.RazorPages;
using NToastNotify;

namespace ToastDemo.Pages
{
    public class IndexModel : PageModel
    {
        private readonly ILogger<IndexModel> _logger;
        private readonly IToastNotification _toastNotification;

        public IndexModel(ILogger<IndexModel> logger, IToastNotification toastNotification)
        {
            _logger = logger;
            _toastNotification = toastNotification;
        }

        public void OnGet()
        {
            // Success Toast
            _toastNotification.AddSuccessToastMessage("Woo hoo - it works!");

            // Info Toast
            _toastNotification.AddInfoToastMessage("Here is some information.");

            // Error Toast
            _toastNotification.AddErrorToastMessage("Woops an error occured.");

            // Warning Toast
            _toastNotification.AddWarningToastMessage("Here is a simple warning!");
        }
    }
}

Let’s spin that up.

different kind of toast notifications, toast notifications
NToastNotify Toast Notifications in ASP.NET Core Web App

Awesome – it works! Now let’s move on to ToastNotification and see how we can implement that NuGet package inside our Web Application.

Implement ToastNotification in ASP.NET Core

The second package I will show you how to use is ToastNotification and is my preferred package for creating Elegant Toast Notifications in ASP.NET Core Web Applications. It also supports AJAX calls, which I use a lot when interacting with APIs and right now it implements two popular toast JavaScript libraries: Toastify-js and Notyf. Let’s implement them in our Web App.

#1 – Install ToastNotification from NuGet

You can install the NuGet package by using one of your preferred methods below:

Install-Package AspNetCoreHero.ToastNotification
dotnet add package AspNetCoreHero.ToastNotification
<PackageReference Include="AspNetCoreHero.ToastNotification" Version="VERSION-HERE" />
paket add AspNetCoreHero.ToastNotification
// Install AspNetCoreHero.ToastNotification as a Cake Addin
#addin nuget:?package=AspNetCoreHero.ToastNotification&version=1.1.0

// Install AspNetCoreHero.ToastNotification as a Cake Tool
#tool nuget:?package=AspNetCoreHero.ToastNotification&version=1.1.0

With that out of the way, let’s move on to the fun part.

#2 – Register ToastNotification in the Service Container

Open Program.cs and add the following line of code to the service container:

using AspNetCoreHero.ToastNotification;
using NToastNotify;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddRazorPages().AddNToastNotifyNoty(new NotyOptions
{
    ProgressBar = true,
    Timeout = 5000
});

// Add ToastNotification
builder.Services.AddNotyf(config =>
{
    config.DurationInSeconds = 5;
    config.IsDismissable = true;
    config.Position = NotyfPosition.TopRight;
});

#3 – Add ToastNotification Middleware

If you like me or many other developers who are working with Partial Views, returned data from APIs, etc… then you need to configure this middleware to make sure that the notification is loaded without reloading the page (AJAX).

Add the following using statement to the top of Program.cs : using AspNetCoreHero.ToastNotification.Extensions;

Now add the following line of code to the Configuration part of your Program.cs file.

var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
    app.UseExceptionHandler("/Error");
    // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
    app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.UseNToastNotify();

app.UseNotyf();

app.MapRazorPages();

app.Run();

#4 – Add the Notyf component to your layout page

Just like we did before, we have to open up _Layout.cshtml and add this line: @await Component.InvokeAsync("Notyf") to the bottom of the file, in order to display the toast notifications in our Views.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - ToastDemo</title>
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
    <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
    <link rel="stylesheet" href="~/ToastDemo.styles.css" asp-append-version="true" />
</head>
<body>
    <header>
        <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
            <div class="container">
                <a class="navbar-brand" asp-area="" asp-page="/Index">ToastDemo</a>
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
                        aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
                    <ul class="navbar-nav flex-grow-1">
                        <li class="nav-item">
                            <a class="nav-link text-dark" asp-area="" asp-page="/Index">Forside</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link text-dark" asp-area="" asp-page="/Privacy">Privacy</a>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    </header>
    <div class="container">
        <main role="main" class="pb-3">
            @RenderBody()
        </main>
    </div>

    <footer class="border-top footer text-muted">
        <div class="container">
            &copy; 2022 - ToastDemo - <a asp-area="" asp-page="/Privacy">Privacy</a>
        </div>
    </footer>

    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script src="~/js/site.js" asp-append-version="true"></script>

    @await RenderSectionAsync("Scripts", required: false)
    @await Component.InvokeAsync("NToastNotify")
    @await Component.InvokeAsync("Notyf")
</body>
</html>

#5 – Add your Toast Notifications to the OnGet() method at the Privacy Policy page

First, we have to do some Dependency Injection (DI) inside Privacy.cshtml.cs, like I have done below:

using AspNetCoreHero.ToastNotification.Abstractions;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace ToastDemo.Pages
{
    public class PrivacyModel : PageModel
    {
        private readonly ILogger<PrivacyModel> _logger;
        private readonly INotyfService _toastNotification;

        public PrivacyModel(ILogger<PrivacyModel> logger, INotyfService toastNotification)
        {
            _logger = logger;
            _toastNotification = toastNotification;
        }

        public void OnGet()
        {
            
        }
    }
}

Let’s add some toast notifications to the OnGet() method. By default the toast notification service will use the global settings we supplied in Program.cs when we registered the service inside the service container, but what if we want to change the settings for the toast notification? See below:

public void OnGet()
{
    _toastNotification.Success("A success for christian-schou.dk");
    _toastNotification.Success("A success toast that will last for 10 seconds.", 10);
}

Spin it up:

success toast notifications with timer, toast notifications, toast
Success Toast Notifications with timer

Voila – that looks good! Let’s add some different kinds of toast notifications to the web application. Below is some code for adding warnings, information and error toasts to the page:

public void OnGet()
{
    _toastNotification.Success("A success for christian-schou.dk");
    _toastNotification.Information("Here is an info toast - closes in 6 seconds.", 6);
    _toastNotification.Warning("Be aware, here is a warning toast.");
    _toastNotification.Error("Ouch - An error occured. This message closes in 4 seconds.", 4);       }

What does that look like:

Different kinds of Toast Notifications with timers

What if I need to go beyond the default toast notifications? Maybe you already noticed it, but we actually have a Custom toast notification inside the package as well. Below is some code on how you can tweak the toast notification to fit perfectly to your needs:

public void OnGet()
{
    // Custom Notifications
    _toastNotification.Custom("Here is a message for you - closes in 8 seconds.", 8, "#602AC3", "fa fa-envelope-o");
    _toastNotification.Custom("Please check the settings for your profile - closes in 6 seconds.", 6, "#0c343d", "fa fa-user");
}

Let’s run that and see what it looks like:

custom toast notifications
Custom Toast Notifications in ASP.NET Core Web App

The final file should look like this:

using AspNetCoreHero.ToastNotification.Abstractions;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace ToastDemo.Pages
{
    public class PrivacyModel : PageModel
    {
        private readonly ILogger<PrivacyModel> _logger;
        private readonly INotyfService _toastNotification;

        public PrivacyModel(ILogger<PrivacyModel> logger, INotyfService toastNotification)
        {
            _logger = logger;
            _toastNotification = toastNotification;
        }

        public void OnGet()
        {
            // Default Notifications
            _toastNotification.Success("A success for christian-schou.dk");
            _toastNotification.Information("Here is an info toast - closes in 6 seconds.", 6);
            _toastNotification.Warning("Be aware, here is a warning toast.");
            _toastNotification.Error("Ouch - An error occured. This message closes in 4 seconds.", 4);

            // Custom Notifications
            _toastNotification.Custom("Here is a message for you - closes in 8 seconds.", 8, "#602AC3", "fa fa-envelope-o");
            _toastNotification.Custom("Please check the settings for your profile - closes in 6 seconds.", 6, "#0c343d", "fa fa-user");
        }
    }
}

Summary

In this tutorial, we saw how easy it is to implement toast notification inside our ASP.NET Core Application. It will enrich the user experience a lot and make it easier for the developer to show a status of what is going on inside the application when the user is interacting with the functionality.

Both libraries are good go-to NuGet packages for implementing toast notifications inside our applications. The one I like the most is definitely the last one I showed you. It’s easy to use and customize to fit your needs in a given scenario.

Below is a link to the source code at my Github. You are welcome to clone or copy it for your own applications. If you got any questions, suggestions, or issues, please let me know in the comments. Have an awesome day!

https://github.com/Christian-Schou/ToastDemo/
Tags: .NET 6AJAXASP.NET CoreC#DevelopmentFront-endNotificationNotificationsToastToastsWeb
Previous Post

How to implement GraphQL in ASP.Net Core Web API (.NET 6) using HotChocolate

Next Post

How to ping IP and port from Windows or Linux

Christian

Christian

Hello 👋 My name is Christian and I am 26 years old. I'm an educated Software Developer with a primary focus on C#, .NET Core, Python, and PowerShell. Currently, I'm expanding my skills in Software Robots and Cloud Architecture. In some of my spare time, I share my knowledge about tech stuff on my blog.

Related Posts

watchdog
ASP.NET Core

The #1 guide to show real-time .NET 6 logs for Web Apps and APIs in a modern way using WatchDog for Free

by Christian
13. august 2022
0

A reader recently asked me for a more modern way to view log files for requests and exceptions in a...

Read more
restful web api

How to build a RESTful Web API using ASP.NET Core and Entity Framework Core (.NET 6)

25. juli 2022
dynamically register entities

How to Dynamically Register Entities in DbContext by Extending ModelBuilder?

23. juli 2022
Dockerize ASP.NET Core

How to Compose an ASP.NET Core Web API (.NET 6) with an MS SQL Server 2022 on Linux in Docker

19. juli 2022
pattern matching in switch

How to do pattern matching in switch statements – C# version >= 7.0

11. juli 2022
Next Post
ping ip and port

How to ping IP and port from Windows or Linux

Comments 2

  1. Giorgi says:
    2 måneder ago

    Thank you for the tutorial.
    I was wondering how can I display notification when certain time is reached.
    I have times saved in database. When the time saved is equals to current time I would like to show a notification.
    However, I could not figure out how to do it exactly. Thanks

    Svar
    • Christian Schou says:
      2 måneder ago

      Hi

      Are you trying to show notifications based on a predefined time from a kind of “settings” in your database? If so, you could load your database values into a configuration that could be injected at runtime in the notification timer.

      Svar

Skriv et svar Annuller svar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *

Christian Schou

Christian Schou

Software Developer

Hello - my name is Christian and I am 26 years old. I'm an educated Software Developer with a primary focus on C#, .NET Core, Python, and PowerShell. Currently, I'm expanding my skills in Software Robots and Cloud Architecture. In some of my spare time, I share my knowledge about tech stuff on my blog.

Recent articles

personal website
Career

Top 6 things to add on your personal website to get hired for a tech job

by Christian
7. august 2022
0

Back in the days before the internet was a thing like it is today, we used to have business cards...

Read more
watchdog

The #1 guide to show real-time .NET 6 logs for Web Apps and APIs in a modern way using WatchDog for Free

13. august 2022
get hired for a tech job

5 tips to help you get hired for a tech job

31. juli 2022
restful web api

How to build a RESTful Web API using ASP.NET Core and Entity Framework Core (.NET 6)

25. juli 2022
dynamically register entities

How to Dynamically Register Entities in DbContext by Extending ModelBuilder?

23. juli 2022

Christian Schou

Software Developer

Hello - my name is Christian and I am 26 years old. I'm an educated Software Developer with a primary focus on C#, .NET Core, Python, and PowerShell. Currently, I'm expanding my skills in Software Robots and Cloud Architecture. In some of my spare time, I share my knowledge about tech stuff on my blog.

Recent articles

personal website

Top 6 things to add on your personal website to get hired for a tech job

7. august 2022
watchdog

The #1 guide to show real-time .NET 6 logs for Web Apps and APIs in a modern way using WatchDog for Free

13. august 2022
get hired for a tech job

5 tips to help you get hired for a tech job

31. juli 2022
  • da_DKDansk
    • en_USEnglish
    • de_DEDeutsch
    • hi_INहिन्दी
    • pt_BRPortuguês do Brasil
  • Contact
  • Privatlivspolitik
  • Vilkår og betingelser

© 2022 Christian Schou - All rights reserved.

No Result
View All Result
  • Forside
  • Blog
    • Programmering
      • C#
      • PowerShell
      • Python
      • SQL
    • WordPress
      • Guides
    • Cloud
    • Boligautomatisering
      • Home Assistant
    • Career
  • Services
  • Ordbog
  • About

© 2022 Christian Schou - All rights reserved.

Jeg bruger cookies på min hjemmeside for at give dig den mest relevante oplevelse ved at huske dine præferencer og gentage besøg. Ved at klikke på "Accepter“, du giver dit samtykke til brugen af ALLE cookies.
Sælg ikke mine personlige informationer.
Cookie indstillingerACCEPT
Privat & Cookies politik

Overblik over privatliv

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Altid aktiveret
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
CookieVarighedBeskrivelse
__gads1 year 24 daysThe __gads cookie, set by Google, is stored under DoubleClick domain and tracks the number of times users see an advert, measures the success of the campaign and calculates its revenue. This cookie can only be read from the domain they are set on and will not track any data while browsing through other sites.
_ga2 yearsThe _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors.
_ga_0J2F6JVWSD2 yearsThis cookie is installed by Google Analytics.
_gat_gtag_UA_84232734_11 minuteSet by Google to distinguish users.
_gid1 dayInstalled by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously.
YouTube2 yearsYouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data. I embed YouTube videos in my articles/tutorials - you won't get the full experience of the articles if this is deactivated.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
CookieVarighedBeskrivelse
IDE1 year 24 daysGoogle DoubleClick IDE cookies are used to store information about how the user uses the website to present them with relevant ads and according to the user profile.
test_cookie15 minutesThe test_cookie is set by doubleclick.net and is used to determine if the user's browser supports cookies.
VISITOR_INFO1_LIVE5 months 27 daysA cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.
YSCsessionYSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.
yt-remote-connected-devicesneverYouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
yt-remote-device-idneverYouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
GEM & ACCEPTÈR
Powered by CookieYes Logo