dat-fox icon indicating copy to clipboard operation
dat-fox copied to clipboard

Redirect to dat website if available

Open wuniversales opened this issue 4 years ago • 2 comments

For example, give the option to automatically redirect from

https://beakerbrowser.com/

To your Dat website

dat: //beakerbrowser.com/

wuniversales avatar Feb 18 '20 17:02 wuniversales

A simple version of this should be easy to implement. The availability of a dat version of a site is currently detected here: https://github.com/sammacbeth/dat-fox/blob/master/background/page-action.js#L12 . If a redirect is forced there to the dat url, it will be from then on loaded over dat. This feature could be toggled via a checkbox on the settings page.

We may also need to consider how to revert to HTTP if the dat version is unavailable. We could add a button in the page action to do that.

I'd take a PR for these changes if someone wanted to jump on it.

sammacbeth avatar Feb 19 '20 10:02 sammacbeth

We may also need to consider how to revert to HTTP if the dat version is unavailable. We could add a button in the page action to do that.

Maybe do the reverse? Start loading it in the background and only redirect from HTTP to Dat when it’s verified that Dat is working. Sudden redirects while you’re busy reading a page isn’t a pleasant UX. Maybe wait until the next pageview and redirect only for cached dat-dns responses?

da2x avatar Mar 31 '20 17:03 da2x