Every page carries 8.5 kB of inline JavaScript that could be cached
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- backend, performance
Direzione di ricerca
Read the JavaScript functions in events.php, tags.php, users.php, and bowser.php, then inspect how system/ assets are served and included. Check linked PR #686 before starting, since it is already open against this issue. Done means shared functions load from cached system/assets/hypha.js, tag functions are sent only to members, and behavior is unchanged apart from removing the IE6 fallback.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Every page carries about 8.5 kB of inline JavaScript (measured on the home page of a site with 1,000 pages, 70% of the 12 kB HTML). It is sent again with every page and cannot be cached by the browser or a CDN.
| Part | Size | Needed |
|---|---|---|
hypha(), ajax(), notify(), notifyTimer() (events.php) |
4.0 kB | on every page, but the same on every page |
selectTag(), deselectTag(), newTag() (tags.php) |
1.3 kB | only for members, who can change tags |
login(), reregister() (users.php) |
2.5 kB | for visitors; #645 replaces it by a page without JavaScript |
showBrowserNotSupportedPopup() (bowser.php) |
0.7 kB | see #453 |
A large publisher sends its JavaScript as separate, cached files and keeps only small data blocks inline.
Inline scripts also stand in the way of a Content-Security-Policy for scripts without 'unsafe-inline' (#432, PR #671).
Expected
- The functions that are the same on every page are in a static file,
system/assets/hypha.js, which the browser caches (thesystem/files are sent withCache-Control: public, max-age=86400). - The tag functions are only sent to members.
- Behaviour does not change. The fallback to
ActiveXObjectfor Internet Explorer 6 can go: every browser since 2006 hasXMLHttpRequest.
- Lingua principale
- JavaScript
- Stelle
- 5
- Fork
- 9
- Merge medio
- 18h 49m
- PR unite (30g)
- 13
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PlanBCode/hypha
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Medium Level: Easy Type: Bug Value: Users
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Low Level: Easy Type: Bug Value: Coders
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
PlanBCode/hypha#586 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PlanBCode/hypha
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
processing/p5.sound.js#132 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
jellyfin/jellyfin-web#8791 ·
I maintainer di solito rispondono entro 1 giorno
-
bug triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
fjaeckel/seriesoftubes#306 ·
I maintainer di solito rispondono entro 1 giorno
-
ai bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
hugomrdias/playwright-test#753 ·
I maintainer di solito rispondono entro 1 giorno