NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/57962: bozohttpd directory listings aren't mobile-friendly
>Number: 57962
>Category: bin
>Synopsis: bozohttpd directory listings aren't mobile-friendly
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Feb 26 16:55:00 +0000 2024
>Originator: D. Bohdan
>Release: -CURRENT
>Organization:
>Environment:
>Description:
A typical mobile browser on a smartphone assumes a page without a "viewport"
<meta> tag is designed for desktop browsers. It displays the page in a
virtual window that simulates a wider screen and does not adjust it for
the phone's pixel density. The usual result is that the content on the page
looks small, and interacting with the page comfortably and precisely requires
zoom. This is currently the case with bozohttpd directory listing pages. Here
is what one looks like in Firefox for Android:
https://paste.dbohdan.com/bozohttpd-before.1708956152.png
Adding a standard <meta> "viewport" tag makes the page look much more at home
on a phone:
https://paste.dbohdan.com/bozohttpd-after.1708956152.png
The updated page can be used without zoom. This does not affect desktop
browsing. It also doesn't require changes to the rest of the HTML markup.
>How-To-Repeat:
>Fix:
Index: src/libexec/httpd/dir-index-bozo.c
===================================================================
RCS file: /cvsroot/src/libexec/httpd/dir-index-bozo.c,v
retrieving revision 1.36
diff -u -r1.36 dir-index-bozo.c
--- src/libexec/httpd/dir-index-bozo.c 18 May 2022 00:37:11 -0000 1.36
+++ src/libexec/httpd/dir-index-bozo.c 26 Feb 2024 13:37:37 -0000
@@ -123,6 +123,7 @@
bozo_printf(httpd,
"<!DOCTYPE html>\r\n"
"<html><head><meta charset=\"utf-8\"/>\r\n"
+ "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n"
"<style type=\"text/css\">\r\n"
"table {\r\n"
"\tborder-top: 1px solid black;\r\n"
Home |
Main Index |
Thread Index |
Old Index