diff -pruN dillo-0.8.2/src/browser.h dillo-0.8.2-refresh/src/browser.h
--- dillo-0.8.2/src/browser.h	2004-05-22 00:13:07.000000000 +0200
+++ dillo-0.8.2-refresh/src/browser.h	2004-10-28 09:43:46.000000000 +0200
@@ -134,6 +134,10 @@ struct _BrowserWindow
 
    /* The id for the idle function that sets button sensitivity. */
    guint sens_idle_id;
+   
+   /* RAF, 2004-10-26: usefull to refresh tag */
+   guint timeout;
+   DilloUrl *refresh_url;
 };
 
 
diff -pruN dillo-0.8.2/src/dillo.c dillo-0.8.2-refresh/src/dillo.c
--- dillo-0.8.2/src/dillo.c	2004-06-11 01:22:55.000000000 +0200
+++ dillo-0.8.2-refresh/src/dillo.c	2004-10-28 09:47:51.000000000 +0200
@@ -69,6 +69,7 @@ enum {
    DILLO_CLI_LOCAL         = 1 << 5,
    DILLO_CLI_GEOMETRY      = 1 << 6,
    DILLO_CLI_DBG_RENDERING = 1 << 7,
+   DILLO_CLI_REFRESH       = 1 << 8,
    DILLO_CLI_ERROR         = 1 << 31
 };
 
@@ -81,6 +82,9 @@ enum {
  */
 gboolean dillo_dbg_rendering = FALSE;
 
+/* RAF, 2004-10-27: adding command line option to allow refresh */
+gboolean dillo_refresh = FALSE;
+
 /*
  * Forward declarations
  */
@@ -112,6 +116,9 @@ static CLI_options Options[] = {
                           0, DILLO_CLI_DBG_RENDERING,
     "  -D, --debug-rendering  Draw additionaly several lines in a web page,\n"
     "                         representing its structure. For debugging. "},
+	/* RAF 2004-10-27: command line option add */
+   {"-r", "-refresh",    0, DILLO_CLI_REFRESH,
+    "  -r, -refresh           Allow meta refresh working as webmaster decided."},
    {NULL, NULL, 0, 0, NULL}
 };
 
@@ -246,6 +253,10 @@ gint main(int argc, char *argv[])
      case DILLO_CLI_DBG_RENDERING:
         dillo_dbg_rendering = TRUE;
         break;
+	 /* RAF, 2004-10-27: adding command line option for meta refresh */
+     case DILLO_CLI_REFRESH:
+        dillo_refresh = TRUE;
+        break;	 
      case DILLO_CLI_GEOMETRY:
        if (a_Misc_parse_geometry(opt_argv[0], &xpos, &ypos, &width, &height))
           break;
diff -pruN dillo-0.8.2/src/dillo.h dillo-0.8.2-refresh/src/dillo.h
--- dillo-0.8.2/src/dillo.h	2004-05-22 00:13:07.000000000 +0200
+++ dillo-0.8.2-refresh/src/dillo.h	2004-10-27 13:41:15.000000000 +0200
@@ -6,4 +6,7 @@
 
 extern gboolean dillo_dbg_rendering;
 
+/* RAF, 2004-10-27: adding command line option to allow refresh */
+extern gboolean dillo_refresh;
+
 #endif /* __DILLO_H__ */
diff -pruN dillo-0.8.2/src/html.c dillo-0.8.2-refresh/src/html.c
--- dillo-0.8.2/src/html.c	2004-06-30 04:50:36.000000000 +0200
+++ dillo-0.8.2-refresh/src/html.c	2004-10-28 09:57:45.000000000 +0200
@@ -3014,10 +3014,41 @@ static void Html_tag_close_form(DilloHtm
  * solution is to stack it until IN_BODY, but as currently dillo doesn't
  * check that and starts rendering from the first HTML stream, is OK.
  */
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
+ * WORKING ON SUPPORTING DEPRECATED META REFRESH
+ * Roberto A. Foglietta <roberto.foglietta@sad.it>
+ * 
+ *  Actually I'm working for a local public transport company in which
+ * I have to to develop a new way to display time table and information
+ * to people. Using Dillo into embedded linux system allow my collegues 
+ * to change graphical display just editing php code in the server BUT
+ * this kind of information have to stay up-to-date. Commit a refresh
+ * from server is, in this case, the best solution I can immagine. 
+ *  So supporting meta refresh tag makes Dillo good for embedded client 
+ * systems. This is the main reason because I developed this web-deprecated 
+ * but very-useful-in-embedded function. In addition to this pratical 
+ * consideration I think people use free software to be free, so it makes 
+ * sense give them the freedoom to choose also deprecated functions. 
+ *  Obviously to respect Dillo's team decision to do not allow refresh 
+ * as default policy I make it optional by setting a flag from command 
+ * line
+ */
+ 
+void refresh_callback(gpointer client_data) {
+	BrowserWindow *bw = client_data;
+
+	if(bw->refresh_url) {
+		a_Nav_push(bw, bw->refresh_url);
+	} else {
+		a_Nav_reload(bw);
+	}
+}
+
 static void Html_tag_open_meta(DilloHtml *html, char *tag, gint tagsize)
 {
-   static gint Html_write_raw();
-   const gchar *meta_template =
+	static gint Html_write_raw();
+	const gchar *meta_template =
 "<table width='100%%'><tr><td bgcolor='#ee0000'>Warning:</td>\n"
 " <td bgcolor='#8899aa' width='100%%'>\n"
 " This page uses the NON-STANDARD meta refresh tag.<br> The HTML 4.01 SPEC\n"
@@ -3025,35 +3056,92 @@ static void Html_tag_open_meta(DilloHtml
 " <tr><td bgcolor='#a0a0a0' colspan='2'>The author wanted you to go\n"
 " <a href='%s'>here</a>%s</td></tr></table><br>\n";
 
-   const gchar *equiv, *content;
-   gchar *html_msg, delay_str[64];
-   gint delay;
-
-   /* only valid inside HEAD */
-   if (!(html->InFlags & IN_HEAD)) {
-      MSG_HTML("META elements must be inside the HEAD section\n");
-      return;
-   }
-
-   if ((equiv = Html_get_attr(html, tag, tagsize, "http-equiv")) &&
-       !g_strcasecmp(equiv, "refresh") &&
-       (content = Html_get_attr(html, tag, tagsize, "content"))) {
-
-      /* Get delay, if present, and make a message with it */
-      if ((delay = strtol(content, NULL, 0)))
-         g_snprintf(delay_str, 64, " after %d second%s.",
-                    delay, (delay > 1) ? "s" : "");
-      else
-         sprintf(delay_str, ".");
-
-      /* Skip to anything after "URL=" */
-      while (*content && *(content++) != '=');
-
-      /* Send a custom HTML message */
-      html_msg = g_strdup_printf(meta_template, content, delay_str);
-      Html_write_raw(html, html_msg, strlen(html_msg), 0);
-      g_free(html_msg);
-   }
+	const gchar *content;
+	gchar *equiv, *ptr;
+	gchar *html_msg, delay_str[64];
+	gint delay;
+
+	/* only valid inside HEAD */
+	if (!(html->InFlags & IN_HEAD)) {
+	MSG_HTML("META elements must be inside the HEAD section\n");
+	return;
+	}
+
+	/* RAF, 2004-10-25: */
+	equiv = g_strdup(Html_get_attr(html, tag, tagsize, "http-equiv"));
+	/*  ^^^^^^^^^^ bug fix: using a strdup here is mandatory 
+	* or it will be found the same value both in equiv and content. 
+	* This is the main reason because Html_get_attr return a 
+	* const pointer, because the pointer which return is one
+	* static inside itself. The gcc warning about const/non-const 
+	* pointer cast is usefull to bugfix this mistakes. Bypass it 
+	* simple declaring equiv and content const doesn't help! ;-)
+	*/
+	content = Html_get_attr(html, tag, tagsize, "content");
+	if (!equiv || !content || g_strcasecmp(equiv, "refresh")) {
+		g_free(equiv);
+		return;
+	}
+	g_free(equiv);
+
+	/* check for delay */
+	delay = strtol(content, &ptr, 0);		
+	if(ptr)	ptr = (gchar *)content;
+
+	if(*ptr) {		
+		/* todo: fix this to parse "URL =" & friends (HTML spec) */
+		/* RAF, 2004-10-25: DONE, I suppose... */
+		if (strstr(ptr, "URL") ||  strstr(ptr, "url") ||  strstr(ptr, "Url")) {
+			ptr = strstr(ptr,  "=");
+			while (*(++ptr) == ' ' && *ptr != '>'); /* skip URL= & friends */	  
+			if(*ptr == '>') *ptr = 0; /* doesn't exist any URL= */
+		} else {
+			*ptr = 0; /* doesn't exist any URL= */
+		}
+	}
+
+	if(!*ptr && !delay) {
+		return;
+	} else {
+		g_print("meta refresh: start with refresh %sallowed\n", (dillo_refresh) ? "" : "not ");
+		g_print("meta refresh: delay -> %d, url -> %s\n", delay, (*ptr) ? ptr : "none");
+	}
+
+	if(!dillo_refresh) {
+	      /* Get delay, if present, and make a message with it */
+	      if ((delay = strtol(content, NULL, 0)))
+		 g_snprintf(delay_str, 64, " after %d second%s.",
+			    delay, (delay > 1) ? "s" : "");
+	      else
+		 sprintf(delay_str, ".");
+
+	      /* Skip to anything after "URL=" */
+	      while (*content && *(content++) != '=');
+
+	      /* Send a custom HTML message */
+	      html_msg = g_strdup_printf(meta_template, content, delay_str);
+	      Html_write_raw(html, html_msg, strlen(html_msg), 0);
+	      g_free(html_msg);
+	} else {	
+		if(html->bw->refresh_url)
+			a_Url_free(html->bw->refresh_url);
+		if(*ptr) {
+			html->bw->refresh_url = a_Url_new(ptr, NULL, 0, 0, 0);
+		} else {
+			html->bw->refresh_url = NULL;
+		}
+		
+		/* RAF, 2004-10-25: Use a timeout to refresh the page automatically  */
+		if(html->bw->timeout)
+			gtk_timeout_remove(html->bw->timeout);
+		if(delay) {
+			html->bw->timeout = gtk_timeout_add((guint32)delay*1000, 
+				(GtkFunction)refresh_callback, (gpointer)(html->bw));
+		} else {
+			html->bw->timeout = 0;
+			refresh_callback(html->bw);
+		}
+   	}
 }
 
 /*
diff -pruN dillo-0.8.2/src/interface.c dillo-0.8.2-refresh/src/interface.c
--- dillo-0.8.2/src/interface.c	2004-06-18 17:07:27.000000000 +0200
+++ dillo-0.8.2-refresh/src/interface.c	2004-10-28 09:59:03.000000000 +0200
@@ -1125,6 +1125,10 @@ a_Interface_browser_window_new(gint widt
    bw->viewsource_window = NULL;
    bw->pagebugs_window = NULL;
 
+   /* RAF, 2004-10-26: null value for time out */
+   bw->timeout = 0;
+   bw->refresh_url = NULL;
+
    /* now that the bw is made, let's customize it.. */
    Interface_browser_window_customize(bw);
 
diff -pruN dillo-0.8.2/src/nav.c dillo-0.8.2-refresh/src/nav.c
--- dillo-0.8.2/src/nav.c	2004-05-26 15:08:27.000000000 +0200
+++ dillo-0.8.2-refresh/src/nav.c	2004-10-28 10:00:26.000000000 +0200
@@ -56,6 +56,9 @@ void a_Nav_free(BrowserWindow *bw)
 {
    a_Nav_cancel_expect(bw);
    g_free(bw->nav_stack);
+
+   /* RAF, 2004-10-27: free the url redirection */
+   a_Url_free(bw->refresh_url);
 }
 
 

