Every page carries 8.5 kB of inline JavaScript that could be cached
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- backend, performance
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 5
- Fork
- 9
- Merge trung bình
- 18 giờ 49 phút
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PlanBCode/hypha
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Medium Level: Easy Type: Bug Value: Users
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Low Level: Easy Type: Bug Value: Coders
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
PlanBCode/hypha#586 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PlanBCode/hypha
Issue tương tự
-
bug web-ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
jenkinsci/jenkins#27705 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
maproulette/maproulette-frontend#2978 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
live-codes/livecodes#1079 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: ON Football HD feed LogoĐang mởapproved check:passed logos:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 2 ngày