diff --git a/config/apache/standardebooks.org.conf b/config/apache/standardebooks.org.conf
index 762fc9f4..9daadc5b 100644
--- a/config/apache/standardebooks.org.conf
+++ b/config/apache/standardebooks.org.conf
@@ -96,16 +96,23 @@ Define webroot /standardebooks.org/web
Header set Content-Disposition "attachment; filename=%{FILENAME}e"
-
- DirectoryIndex index.xml
-
-
# We explicitly set the content-type for items in the /vocab/ directory, because Apache doesn't set it for us,
# and we need a content-type header when using the "nosniff" header. See https://bugzilla.mozilla.org/show_bug.cgi?id=1547076
Header set Content-Type "text/plain"
+ # text/xml allows the page to be displayed in a browser. application/atom+xml will cause it to be downloaded.
+
+ DirectoryIndex index.xml
+ Header set Content-Type "text/xml"
+
+
+ # text/xml allows the page to be displayed in a browser. application/rss+xml will cause it to be downloaded.
+
+ Header set Content-Type "text/xml"
+
+
# Enable HTTP CORS so that browser-based readers like Readium can access opds and ebooks
# Allow fonts for newsletter emails
# See https://github.com/standardebooks/tools/issues/2
diff --git a/config/apache/standardebooks.test.conf b/config/apache/standardebooks.test.conf
index 2f10b355..8b949fc4 100644
--- a/config/apache/standardebooks.test.conf
+++ b/config/apache/standardebooks.test.conf
@@ -95,16 +95,23 @@ Define webroot /standardebooks.org/web
Header set Content-Disposition "attachment; filename=%{FILENAME}e"
-
- DirectoryIndex index.xml
-
-
# We explicitly set the content-type for items in the /vocab/ directory, because Apache doesn't set it for us,
# and we need a content-type header when using the "nosniff" header. See https://bugzilla.mozilla.org/show_bug.cgi?id=1547076
Header set Content-Type "text/plain"
+ # text/xml allows the page to be displayed in a browser. application/atom+xml will cause it to be downloaded.
+
+ DirectoryIndex index.xml
+ Header set Content-Type "text/xml"
+
+
+ # text/xml allows the page to be displayed in a browser. application/rss+xml will cause it to be downloaded.
+
+ Header set Content-Type "text/xml"
+
+
# Enable HTTP CORS so that browser-based readers like Readium can access opds and ebooks
# Allow fonts for newsletter emails
# See https://github.com/standardebooks/tools/issues/2
diff --git a/scripts/generate-rss.php b/scripts/generate-rss.php
index b20b65b4..53667858 100644
--- a/scripts/generate-rss.php
+++ b/scripts/generate-rss.php
@@ -35,7 +35,8 @@ krsort($sortedContentFiles);
$sortedContentFiles = array_slice($sortedContentFiles, 0, $rssLength);
-print("\n\n");
+// XSL stylesheet mime type must be `text/xsl` otherwise Chrome doesn't read it
+print("\n\n");
?>
diff --git a/www/opds/search.php b/www/opds/search.php
index dd6cb260..2985d020 100644
--- a/www/opds/search.php
+++ b/www/opds/search.php
@@ -17,7 +17,6 @@ catch(\Exception $ex){
include(WEB_ROOT . '/404.php');
exit();
}
-header('Content-type: text/xml');
print("\n");
?>
diff --git a/www/rss/style.php b/www/rss/style.php
index 92dcb972..544b8510 100644
--- a/www/rss/style.php
+++ b/www/rss/style.php
@@ -1,10 +1,12 @@
require_once('Core.php');
-header('content-type: application/xslt+xml');
+
+// `text/xsl` is the only mime type recognized by Chrome for XSL stylesheets
+header('Content-Type: text/xsl');
print("\n")
?>
-
-
+
+ /* doctype-system outputs the HTML5 doctype */ ?>
= Template::Header(['xmlDeclaration' => false]) ?>