What would it take for SAFE to be a drop-in replacement for the Web?

I’m talking straight-up porting of static websites to SAFE network, so it can get mass adoption. There are tons of client-side web apps that use server scripts for coordination and logic BUT this would encourage apps to be totally client side and made from static files. All storage would be done with HTTP verbs GET POST PUT DELETE etc.

We would need a browser that reimplements certain APIs such as XMLHTTPRequest and the new fetch() API as well as all web fetching. Such a thing can be done with basic WebView and NSURLRequest on mobile, I think! So a mobile browser can be built.

The thing is, however, that the client MUST do a bunch of operations to encrypt and decrypt the data according to the SAFE protocol. Also when we are dealing with SAFE domains it must use Kademlia based routing instead of DNS.

Did I miss anything? Is it possible to make a browser extension to existing browsers or a whole new browser must be launched such as Beaker browser?

I was under the impression that if we set up gateways on the back end, we could have a fallback for regular browsers in terms of interfacing with SAFE network via web requests. But can a browser be written that uses THE NORMAL WebView in iOS and have all requests to a certain domain or protocol intercepted and sent to SAFE NETWORK?

That would be MAJOR!

What backend? SAFE does not have backends. If an addon is created for existing browsers then it can be insecure and allow old web connections.

A SAFE specific browser is being built now. That is what is being used on the alpha 2 network.


If SAFE can never be a drop-in replacement for the web, it may see much much lower adoption. There are literally millions of web developers, and people know how to use html/css/js files. The questions are:

  1. can people use existing HTML5 APIs such as fetch() and XHR and HTTP requests (eg ) as with the Web so SAFE can be a drop-in replacement for the web, in custom browsers

  2. can there be gateways to SAFE network for SAFE to work alongside the current web in existing browsers?

This is crucial to adoption. I remember having to download the Freenet browser to use freenet. That didn’t get much adoption.

SAFE is like one large server. Have a look at the sites being put up on the alpha network. Music players etc.

All that is required for developers is to change their view on server side processing. It can be argued that anything you expect of a server can be done using SAFE. The issue at the moment is the convenience of languages like “php” etc. This can be solved by php interpreters encapsulated with the safe site app.

So yes there will need to be a change of methods but it can be done. Using database drivers that utilise key-value systems etc.

People now swap between APPs already on their phone so I don’t see it presenting an issue that people have to use the safe browser for all the safe sites and firfox etc for the insecure web.

I am also sure someone will develop browser addons that will work, but the problem is that the user using that will be as insure as if they just used the web. All the tracking, information leaking etc will be occurring.

This is available now using my SAFE Web API. ‘Require’ the library and you have support for LDP on any safe: URI accessed by that website/app using fetch() in Peruse Browser or SAFE Browser.

LDP is an example of course, any RESTful Web protocol can be added to that library. CRUD protocols are quite easy such as WebDav, also FTP etc, and more complex ones like RemoteStorage.io and in time I hope Solid too - certainly easy to port Solid apps.