Redirect Twitter Home to Twitter Notifications using Chrome Extension?

I’m trying to automatically forward all requests to twitter.com/home to twitter.com/notifications . I am trying to use Requestly Chrome & Firefox extension to set up the redirect but the following rule is not working.

enter image description here

Any suggestions or any other way to solve this.

Answer

Twitter uses Service Workers to load the home page of twitter which is twitter.com/home. Chrome Extensions do not work well with ServiceWorkers. Hence, the Redirect Rule can not be used to redirect Twitter Pages.

Here is another post – How to add a parameter to a website (Twitter) using Chrome Extension? which explains how we can change the URL for websites (e.g. Twitter) which uses ServiceWorkers.

We can use Requestly Insert Script Feature to insert scripts on the web pages which works fine.

In this example, there’s a simple script which runs on twitter.com/home and redirects to twitter.com/notifications

You can write your own custom code in the code block if you want redirect to be performed in a certain way or based on some other conditions.

Redirect Twitter Home to Twitter Notifications using Requestly Script feature

Here’s a SharedList https://app.requestly.io/rules/#sharedList/1614680032887-Twitter-Home-to-Notifications which you can directly import and you will get the rule in a single click.

References

Attribution
Source : Link , Question Author : Sachin , Answer Author :
Sachin

Leave a Comment