Could be there are extensions or other items loading alongside
your facebook page that compete with limited resources in Mac.
What other extensions or add-ons does your Safari include that
may not be stock? Anything there, or competing with resources
in your MacBook/Air, could have secondary effects as you see.
{I seldom use Safari in my older Mac, which I prefer to use most
often (even now) is very outdated as it sees no security updates.
I use custom browser(s) with updates. And don't use Facebook.}
The Console utility (see 'Go' in Finder menu> utilities folder, then
launch Console from there) to see time/date logs exactly related
to those instances of Safari and Facebook use online.
Or choose to get & run Etrecheck to see what may be running
in your Mac's OS and what may be using the limited resources.
Using EtreCheck
about etrecheck
https://etrecheck.com/index
And I mean limited, because the small storage and often soldered
in RAM means you're running on a margin; that may be thin now.
Depending on the build model version Mac portable this may vary.
There also may be some kind of malware or other unwanted app
that was loaded in if you upgraded Flash from some popup.
Anyway, if the hard drive is getting full and your chip memory isn't
all that much, Virtual Memory and open applications may be in a
sort of competition for the active resources in the Mac.
Backup your Mac to at least two external drives/devices; one usually
is a wi-fi AirPort/Time Machine. The other may be a full backup such
as a clone utility could provide, this could also be used to start & run
your Mac. Good if the internal drive should fail. Requires preparation.
In any event...
Good luck & happy computing! 🙂