Tuesday, September 17, 2024

Making YouTube usable again

 YouTube has evolved from a platform for educational and entertaining content into a space filled with ads, distractions, and the ever-growing invasion of YouTube Shorts. Like many, I found my productivity slipping, and watching quality tech videos became a challenge. So, I decided to take matters into my own hands, and it worked! Here’s how I made YouTube usable again:

Removing Cookies Regularly

Clearing YouTube cookies frequently has been a game-changer. Not being logged in all the time has cut down on personalized distractions and unnecessary recommendations. Without my history guiding the algorithm, I’m served more general and useful content instead of the clutter I usually see while signed in.

Automating cookie clearing on Mac

1. Create a Shell Script for Brave Browser:

For Brave, cache files are stored in ~/Library/Caches/BraveSoftware/Brave-Browser/Default/Cache/. To clear the YouTube cache:



For Google Chrome:

Chrome stores cache files in the ~/Library/Caches/Google/Chrome/Default/Cache/ directory. To specifically target YouTube cache, we can use the domain youtube.com.

Change the file path(s) in the script accordingly

2. Make the Script Executable:

Save the script as clear_youtube_cache_brave.sh and make it executable.

chmod +x /path/to/clear_youtube_cache_brave.sh

3. Schedule with launchd:

Create the .plist file:

Create a file named com.user.clear_youtube_cache_brave.plist in ~/Library/LaunchAgents/ with the following content:




Load the Launch Agent:
launchctl load ~/Library/LaunchAgents/com.user.clear_youtube_cache_brave.plist

This will schedule the script to clear YouTube cache for Brave every day at 10 PM IST.


4. Test the script:

/path/to/clear_youtube_cache_brave.sh


Blocking Ads and Distractions with uBlock Origin


Ads were the first and biggest obstacle. By using uBlock Origin with some custom filters, I was able to eliminate all ads, including the annoying YouTube Shorts that often derailed my viewing experience. Here’s what worked for me:

  • Block YouTube Shorts entirely.
  • No pop-ups.
  • No in-video ads.
Under the uBlock Origin, go to My filters TAB
Select "Enable my custom filters"
Add the following code to completely disable YouTube shorts:





A Focus on Quality Content
Now that YouTube is free of distractions, I’ve been able to return to what matters—watching quality tech videos. Whether it's tutorials, deep dives into programming, or lectures from conferences, YouTube is once again a platform that supports learning, not distractions.

With these simple steps, YouTube has become usable again. No more logging in, no ads, no shorts—just focused content that enhances my learning and productivity



No comments:

Post a Comment

Making YouTube usable again

 YouTube has evolved from a platform for educational and entertaining content into a space filled with ads, distractions, and the ever-growi...