Remove the Bowser browser detection (Internet Explorer 8 warning)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
- Área
- frontend
Línea de trabajo
Empieza rastreando cómo system/core/bowser.php registra loadBowser() y cómo index.php sirve system/bowser/; inspecciona si hay otros usos de las claves de traducción de la ventana emergente en system/languages/en.php y nl.php. Elimina Bowser, su registro, la ruta de servicio y las traducciones sin uso. El trabajo estará terminado cuando hayan desaparecido la advertencia de IE y los recursos de Bowser, y no queden referencias a las claves eliminadas ni a la biblioteca.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Hypha bundles Bowser 1.x, a browser-detection library. It is used for one thing only: warning visitors who use Internet Explorer 8 or older. Those browsers have been out of use for years, so the library no longer serves a purpose.
Yet every visitor downloads it on every page. It is also outdated third-party JavaScript that has to be tracked and audited. Removing it means one request less per page and one bundled library less.
This was split off from #437 (outdated bundled JavaScript), so that it can be handled on its own; it does not depend on the jQuery or WYMeditor work there.
Affected code (dev 5dae13a; the same files are on master)
| File | What |
|---|---|
system/bowser/bowser.min.js |
Bowser 1.x. There is no version string in the file; the 2015 copyright and the bowser.check() API belong to the 1.x line. |
system/core/bowser.php |
Registers loadBowser() as a post-processing function. It links bowser.min.js into every page and adds an inline script that shows a "browser not supported" popup when bowser.name === 'msie' and the version is below 9. |
index.php |
Serves the files under system/bowser/ (serveFile($hyphaQuery, 'system/bowser')). |
Impact
No known vulnerability in Bowser 1.x. The cost is unnecessary JavaScript on every page, and an outdated library that security scanners flag. Severity: Low.
Suggested fix
Note: this is a suggestion and a starting point, not a finished fix. Please review it and adapt it as you see fit.
- Delete
system/bowser/andsystem/core/bowser.php. - Remove the
system/bowserline from the static file shortcuts inindex.php. - Remove the translation keys used only by the popup (
browser,not-supported) fromsystem/languages/en.phpandnl.php, if no other code uses them. - If a browser check is still wanted, a few lines of feature detection suffice. For example, warn when
fetchorclassListis missing, without a library.
Related: #437, #96.
- Lenguaje dominante
- JavaScript
- Estrellas
- 5
- Forks
- 9
- Merge medio
- 19 h 10 min
- PR fusionados (30 d)
- 12
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PlanBCode/hypha
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Impact: Medium Level: Easy Type: Bug Value: Users
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
Impact: Low Level: Easy Type: Bug Value: Coders
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
PlanBCode/hypha#586 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de PlanBCode/hypha
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
danilogiles/enki-browser#113 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
evcc-io/evcc#35605 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
weavefox/awesome-opc#29 ·
Los mantenedores suelen responder en 1 día