Skip to content

Export to Netscape format

Problem to solve

People like to leave a service, this is one way for them to export their data and be able to import it into a browser. The Netscape format should work with Chrome, Internet Explorer, Safari, and Firefox.

Further details

This will likely be used primarily for leaving the service but it could also provide users with a way to backup data if they are using someone else's hosted version of The Stacks.

Proposal

Add a check for the Accept header in the current GET /entries endpoint. If the Accept header is either unset or application/json, it should continue working as normal and return all the results in JSON.

If the Accept header is text/html, than the export should be performed by creating the Netscape bookmark.html format and setting Content-Type to text/html on the response.

What does success look like, and how can we measure that?

OpenAPI documentation, Postman script(s), and unit tests.

Links / references

Microsoft Developer Network documentation has a simple description of the Netscape bookmark format. More examples can be found by exporting your own bookmarks.