►
From YouTube: Persisting resolution alert
Description
A
All
right,
so
what
we
have
here
is
the
merge
request
related
to
the
resolution,
alert
dismissal.
A
So
persisting
the
resolution
alert
dismissal
so
basically
in
the
current
implementation,
when
the
user
dismisses
this,
this
alert
here
on
top-
it's
not
persisted,
so
it's
just
a
toggle
in
the
code
and
then,
whenever
the
page
is
refreshed,
this
other
area
appears.
So
these
changes
are
regarding
the
persisting,
the
dismissal
and
now,
if
I
go
ahead
and
click
on
this
and
then
refresh
the
page,
it
should
not
really
appear
exactly
and
if
I
go
back
and
then
pick
another
one.
A
A
So
here
you
will
see
the
cookie
it's.
Basically
an
array
of
IDs
there
that
are
dismissed,
I
considered
using
the
user
call
out
helper
function,
so
basically
persistence
in
the
database.
But
then
the
problem
with
that
one
is
that
for
each
vulnerability
we
would
have
to
create
a
new
record
record
in
a
table.
So
it's
not
a
really
viable
solution
for
this
use
case.
That's
why
I
use
cookies
and
and
also
one
one
thing
about
why
not
using
local
storage.
A
So
if
we
use
local
storage,
this
list
my
get
bigger
and
we
will
need
to
keep
track
of
the
local
storage
item
and
then
expire
it
every
X
months.
So
using
cookies,
I
thought
it
was
just
simpler
because
we
can
just
set
the
expire
date,
for
instance,
for
nine
ninety
days,
and
then
it
will
automatically
expire.