diff --git a/mongoose/Config.in b/mongoose/Config.in
index a001247..cd52f2c 100644
--- a/mongoose/Config.in
+++ b/mongoose/Config.in
@@ -14,27 +14,28 @@ choice
 config MONGOOSE
 	bool "mongoose"
 	help
-	  Mongoose embeddded web server
+	  Mongoose embedded web server
 
 endchoice
 
-choice
-	prompt "Web Application Interface"
-	default MONGOOSE_WEB_API_V1
-	help
-	  Choose the bootloader
+menu "Web Application Interface"
 
 config MONGOOSE_WEB_API_V1
 	bool "Version 1 (deprecated)"
+	default y
 	help
 	  Support for version 1
 
 config MONGOOSE_WEB_API_V2
 	bool "Version 2"
+	default n
 	help
 	  Support for version 2
 
-endchoice
+comment "Web API v1 or v2 or both required"
+	depends on !MONGOOSE_WEB_API_V1 && !MONGOOSE_WEB_API_V2
+
+endmenu
 
 config MONGOOSEIPV6
 	bool "IPv6 support"
diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c
index 89a51f3..0401a9a 100644
--- a/mongoose/mongoose_interface.c
+++ b/mongoose/mongoose_interface.c
@@ -25,6 +25,7 @@
 #include <parselib.h>
 #include <progress_ipc.h>
 #include <swupdate_settings.h>
+#include <bsdqueue.h>
 
 #include "mongoose.h"
 
@@ -32,6 +33,9 @@
 #define MG_PORT "8080"
 #define MG_ROOT "."
 
+#define WEB_API_v1 1
+#define WEB_API_v2 2
+
 struct mongoose_options {
 	char *root;
 	char *listing;
@@ -49,6 +53,25 @@ struct file_upload_state {
 
 static struct mg_serve_http_opts s_http_server_opts;
 
+#if !defined(CONFIG_MONGOOSE_WEB_API_V1) && !defined(CONFIG_MONGOOSE_WEB_API_V2)
+#error "WEB API v1 or v2 or both must be defined"
+#endif
+
+#if defined(CONFIG_MONGOOSE_WEB_API_V1) && defined(CONFIG_MONGOOSE_WEB_API_V2)
+#define NUM_CACHED_MESSAGES 100
+
+struct msg_elem {
+	ipc_message msg;
+	SIMPLEQ_ENTRY(msg_elem) next;
+};
+
+SIMPLEQ_HEAD(msglist, msg_elem);
+static struct msglist ipcmessages;
+static unsigned long nrmsgs = 0;
+static pthread_mutex_t msglock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_cond_t msgcond = PTHREAD_COND_INITIALIZER;
+#endif
+
 #if defined(CONFIG_MONGOOSE_WEB_API_V2)
 #define enum_string(x)	[x] = #x
 static const char *get_status_string(unsigned int status)
@@ -112,20 +135,163 @@ static size_t snescape(char *dst, size_t n, const char *src)
 }
 #endif
 
-static void upload_handler(struct mg_connection *nc, int ev, void *p)
+static int get_inst_status(ipc_message *msg, int  __attribute__ ((__unused__)) api_vers)
+{
+#if defined(CONFIG_MONGOOSE_WEB_API_V1) && defined(CONFIG_MONGOOSE_WEB_API_V2)
+	struct msg_elem *newmsg;
+	struct msg_elem *oldmsg;
+	int ret = -1;
+
+	switch (api_vers) {
+	case WEB_API_v1:
+		pthread_mutex_lock(&msglock);
+		pthread_cond_wait(&msgcond, &msglock);
+		oldmsg = SIMPLEQ_FIRST(&ipcmessages);
+		if (oldmsg) {
+			SIMPLEQ_REMOVE_HEAD(&ipcmessages, next);
+			nrmsgs--;
+			memcpy(msg, &oldmsg->msg, sizeof(*msg));
+			free(oldmsg);
+			ret = 0;
+		}
+		pthread_mutex_unlock(&msglock);
+		break;
+
+	case WEB_API_v2:
+		newmsg = (struct msg_elem *)calloc(1, sizeof(*newmsg));
+		if (!newmsg)
+			return -1;
+
+		ret = ipc_get_status(msg);
+
+		/* Cache message for APIv1, but consider
+		 * changed messages only. */
+		if (!ret) {
+			pthread_mutex_lock(&msglock);
+
+			oldmsg = SIMPLEQ_LAST(&ipcmessages, msg_elem, next);
+			if (!oldmsg || memcmp(&oldmsg->msg.data.status,
+					      &msg->data.status,
+					      sizeof(msg->data.status))) {
+
+				nrmsgs++;
+				if (nrmsgs > NUM_CACHED_MESSAGES) {
+					oldmsg = SIMPLEQ_FIRST(&ipcmessages);
+					SIMPLEQ_REMOVE_HEAD(&ipcmessages, next);
+					free(oldmsg);
+					nrmsgs--;
+				}
+
+				memcpy(&newmsg->msg, msg, sizeof(*msg));
+				SIMPLEQ_INSERT_TAIL(&ipcmessages, newmsg, next);
+				newmsg = NULL;
+			}
+
+			pthread_cond_signal(&msgcond);
+			pthread_mutex_unlock(&msglock);
+		}
+
+		if (newmsg)
+			free(newmsg);
+		break;
+	}
+
+	return ret;
+#else
+	return ipc_get_status(msg);
+#endif
+}
+
+static void cleanup_msg_list(void)
+{
+#if defined(CONFIG_MONGOOSE_WEB_API_V1) && defined(CONFIG_MONGOOSE_WEB_API_V2)
+	struct msg_elem *elem;
+
+	pthread_mutex_lock(&msglock);
+
+	while (!SIMPLEQ_EMPTY(&ipcmessages)) {
+		elem = SIMPLEQ_FIRST(&ipcmessages);
+		SIMPLEQ_REMOVE_HEAD(&ipcmessages, next);
+		free(elem);
+	}
+
+	nrmsgs = 0;
+	pthread_mutex_unlock(&msglock);
+#endif
+}
+
+static void upload_handler_v2(struct mg_connection *nc, int ev, void *p)
 {
 	struct mg_http_multipart_part *mp;
 	struct file_upload_state *fus;
+
+	switch (ev) {
+	case MG_EV_HTTP_PART_BEGIN:
+		mp = (struct mg_http_multipart_part *) p;
+
+		fus = (struct file_upload_state *) calloc(1, sizeof(*fus));
+		if (fus == NULL) {
+			mg_http_send_error(nc, 500, "Out of memory");
+			break;
+		}
+
+		cleanup_msg_list();
+
+		fus->fd = ipc_inst_start_ext(SOURCE_WEBSERVER, strlen(mp->file_name), mp->file_name);
+		if (fus->fd < 0) {
+			mg_http_send_error(nc, 500, "Failed to queue command");
+			free(fus);
+			break;
+		}
+
+		mp->user_data = fus;
+
+		break;
+
+	case MG_EV_HTTP_PART_DATA:
+		mp = (struct mg_http_multipart_part *) p;
+		fus = (struct file_upload_state *) mp->user_data;
+
+		if (!fus)
+			break;
+
+		ipc_send_data(fus->fd, (char *) mp->data.p, mp->data.len);
+		fus->len += mp->data.len;
+
+		break;
+
+	case MG_EV_HTTP_PART_END:
+		mp = (struct mg_http_multipart_part *) p;
+		fus = (struct file_upload_state *) mp->user_data;
+
+		if (!fus)
+			break;
+
+		ipc_end(fus->fd);
+
+		mg_send_response_line(nc, 200,
+			"Content-Type: text/plain\r\n"
+			"Connection: close");
+		mg_send(nc, "\r\n", 2);
+		mg_printf(nc, "Ok, %s - %d bytes.\r\n", mp->file_name, (int) fus->len);
+		nc->flags |= MG_F_SEND_AND_CLOSE;
+
+		mp->user_data = NULL;
+		free(fus);
+		break;
+	}
+}
+
 #if defined(CONFIG_MONGOOSE_WEB_API_V1)
+static void upload_handler_v1(struct mg_connection *nc, int ev, void *p)
+{
 	struct mg_str *filename, *data;
 	struct http_message *hm;
 	size_t length;
 	char buf[16];
 	int fd;
-#endif
 
 	switch (ev) {
-#if defined(CONFIG_MONGOOSE_WEB_API_V1)
 	case MG_EV_HTTP_REQUEST:
 		hm = (struct http_message *) p;
 
@@ -149,6 +315,8 @@ static void upload_handler(struct mg_connection *nc, int ev, void *p)
 			return;
 		}
 
+		cleanup_msg_list();
+
 		fd = ipc_inst_start_ext(SOURCE_WEBSERVER, filename->len, filename->p);
 		ipc_send_data(fd, (char *) hm->body.p, hm->body.len);
 		ipc_end(fd);
@@ -161,62 +329,13 @@ static void upload_handler(struct mg_connection *nc, int ev, void *p)
 		nc->flags |= MG_F_SEND_AND_CLOSE;
 
 		break;
-#endif
-	case MG_EV_HTTP_PART_BEGIN:
-		mp = (struct mg_http_multipart_part *) p;
 
-		fus = (struct file_upload_state *) calloc(1, sizeof(*fus));
-		if (fus == NULL) {
-			mg_http_send_error(nc, 500, "Out of memory");
-			break;
-		}
-
-		fus->fd = ipc_inst_start_ext(SOURCE_WEBSERVER, strlen(mp->file_name), mp->file_name);
-		if (fus->fd < 0) {
-			mg_http_send_error(nc, 500, "Failed to queue command");
-			free(fus);
-			break;
-		}
-
-		mp->user_data = fus;
-
-		break;
-
-	case MG_EV_HTTP_PART_DATA:
-		mp = (struct mg_http_multipart_part *) p;
-		fus = (struct file_upload_state *) mp->user_data;
-
-		if (!fus)
-			break;
-
-		ipc_send_data(fus->fd, (char *) mp->data.p, mp->data.len);
-		fus->len += mp->data.len;
-
-		break;
-
-	case MG_EV_HTTP_PART_END:
-		mp = (struct mg_http_multipart_part *) p;
-		fus = (struct file_upload_state *) mp->user_data;
-
-		if (!fus)
-			break;
-
-		ipc_end(fus->fd);
-
-		mg_send_response_line(nc, 200,
-			"Content-Type: text/plain\r\n"
-			"Connection: close");
-		mg_send(nc, "\r\n", 2);
-		mg_printf(nc, "Ok, %s - %d bytes.\r\n", mp->file_name, (int) fus->len);
-		nc->flags |= MG_F_SEND_AND_CLOSE;
-
-		mp->user_data = NULL;
-		free(fus);
+	default:
+		upload_handler_v2(nc, ev, p);
 		break;
 	}
 }
 
-#if defined(CONFIG_MONGOOSE_WEB_API_V1)
 static void recovery_status(struct mg_connection *nc, int ev, void *ev_data)
 {
 	ipc_message ipc;
@@ -226,7 +345,7 @@ static void recovery_status(struct mg_connection *nc, int ev, void *ev_data)
 	(void)ev;
 	(void)ev_data;
 
-	ret = ipc_get_status(&ipc);
+	ret = get_inst_status(&ipc, WEB_API_v1);
 
 	if (ret) {
 		mg_http_send_error(nc, 500, NULL);
@@ -306,7 +425,9 @@ static void post_update_cmd(struct mg_connection *nc, int ev, void *ev_data)
 
 	nc->flags |= MG_F_SEND_AND_CLOSE;
 }
-#elif defined(CONFIG_MONGOOSE_WEB_API_V2)
+#endif
+
+#if defined(CONFIG_MONGOOSE_WEB_API_V2)
 static void restart_handler(struct mg_connection *nc, int ev, void *ev_data)
 {
 	struct http_message *hm = (struct http_message *) ev_data;
@@ -350,7 +471,7 @@ static void *broadcast_message_thread(void *data)
 {
 	for (;;) {
 		ipc_message msg;
-		int ret = ipc_get_status(&msg);
+		int ret = get_inst_status(&msg, WEB_API_v2);
 
 		if (!ret && strlen(msg.data.status.desc) != 0) {
 			struct mg_mgr *mgr = (struct mg_mgr *) data;
@@ -610,15 +731,20 @@ int start_mongoose(const char *cfgfname, int argc, char *argv[])
 		exit(EXIT_FAILURE);
 	}
 
+#if defined(CONFIG_MONGOOSE_WEB_API_V1) && defined(CONFIG_MONGOOSE_WEB_API_V2)
+	SIMPLEQ_INIT(&ipcmessages);
+#endif
+
 #if defined(CONFIG_MONGOOSE_WEB_API_V1)
-	mg_register_http_endpoint(nc, "/handle_post_request", MG_CB(upload_handler, NULL));
+	mg_register_http_endpoint(nc, "/handle_post_request", MG_CB(upload_handler_v1, NULL));
 	mg_register_http_endpoint(nc, "/getstatus.json", MG_CB(recovery_status, NULL));
 	mg_register_http_endpoint(nc, "/rebootTarget", MG_CB(reboot_target, NULL));
 	mg_register_http_endpoint(nc, "/postUpdateCommand", MG_CB(post_update_cmd, NULL));
-#elif defined(CONFIG_MONGOOSE_WEB_API_V2)
+#endif
+#if defined(CONFIG_MONGOOSE_WEB_API_V2)
 	mg_register_http_endpoint(nc, "/restart", restart_handler);
 #endif
-	mg_register_http_endpoint(nc, "/upload", MG_CB(upload_handler, NULL));
+	mg_register_http_endpoint(nc, "/upload", MG_CB(upload_handler_v2, NULL));
 	mg_set_protocol_http_websocket(nc);
 
 #if defined(CONFIG_MONGOOSE_WEB_API_V2)
