Skip to content
NV edited this page May 8, 2012 · 1 revision

work in progress

Version 1.0

Autosave protocol describes how a client (browser extension) interacts with a server.

On CSS file change, the extension sends HTTP request to the server. An example:

HTTP headers:

X-Autosave-version: 1.0
X-URL: http://example.net/main.css
X-Type: stylesheet
X-Path: /Users/nv/Sites/example.net/www/main.css

HTTP body contains a JSON of patch made by google-diff-match-patch:

[{"diffs":[[0,"or: "],[-1,"black"],[1,"white"],[0,";\n  "]],"start1":132,"start2":132,"length1":13,"length2":13}]
Clone this wiki locally