diff --git a/Libraries/LibWeb/HtmlView.cpp b/Libraries/LibWeb/HtmlView.cpp
index 0a1cb337ad..63753203c5 100644
--- a/Libraries/LibWeb/HtmlView.cpp
+++ b/Libraries/LibWeb/HtmlView.cpp
@@ -27,11 +27,11 @@
#include
#include
#include
-#include
#include
#include
#include
#include
+#include
#include
#include
#include
@@ -370,6 +370,13 @@ void HtmlView::load(const URL& url)
ResourceLoader::the().load(
url,
[this, url](auto data, auto& response_headers) {
+ // FIXME: Also check HTTP status code before redirecting
+ auto location = response_headers.get("Location");
+ if (location.has_value()) {
+ load(location.value());
+ return;
+ }
+
if (data.is_null()) {
load_error_page(url, "No data");
return;