Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YSlow analyze + fix the mistakes #5521

Closed
mattab opened this issue Feb 8, 2008 · 5 comments
Closed

YSlow analyze + fix the mistakes #5521

mattab opened this issue Feb 8, 2008 · 5 comments
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Feb 8, 2008

Run the YSlow! analyze on the piwik User interface and fix the problems using Yahoo suggestions.

@anonymous-matomo-user
Copy link

1. Make fewer HTTP requests – Grade:F

```
This page has 19 external JavaScript files.

This page has 5 external StyleSheets.

```

2. Use a CDN – Grade:F

3. Add an Expires header – Grade:F

```
These components do not have a far future Expires header:

(no expires) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/datatable.css (no expires) http://127.0.0.1/Piwik-Dev/plugins/Dashboard/templates/dashboard.css (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/jquery-calendar.css (no expires) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/menu.css (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/thickbox.css (no expires) http://127.0.0.1/Piwik-Dev/libs/javascript/sprintf.js (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/jquery.js (no expires) http://127.0.0.1/Piwik-Dev/themes/default/common.js (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/jquery.dimensions.js (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/tooltip/jquery.tooltip.js (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/truncate/jquery.truncate.js (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/jquery.scrollTo.js (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/jquery-calendar.js (no expires) http://127.0.0.1/Piwik-Dev/libs/swfobject/swfobject.js (no expires) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/datatable.js (no expires) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/calendar.js (no expires) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/date.js (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/jquery.blockUI.js (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/ui.mouse.js (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/ui.sortable_modif.js (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/superfish_modified.js (no expires) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/menu.js (no expires) http://127.0.0.1/Piwik-Dev/libs/jquery/thickbox.js (no expires) http://127.0.0.1/Piwik-Dev/piwik.js (no expires) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/images/more_date.gif (no expires) http://127.0.0.1/Piwik-Dev/themes/default/images/loading-blue.gif (no expires) http://127.0.0.1/Piwik-Dev/piwik.php?url=http%3A%2F%2F127.0.0.1%2FPiwik-Dev%2Findex.php%3Fmodule%3DH[snip]

```

4. Gzip components – Grade:F

```
These components are not gzipped:

(13.6K) http://127.0.0.1/Piwik-Dev/index.php?module=Home&action=index&idSite=1&period=day&date=yesterday (2.4K) http://127.0.0.1/Piwik-Dev/libs/javascript/sprintf.js (52.6K) http://127.0.0.1/Piwik-Dev/libs/jquery/jquery.js (1.4K) http://127.0.0.1/Piwik-Dev/themes/default/common.js (8.5K) http://127.0.0.1/Piwik-Dev/libs/jquery/jquery.dimensions.js (3.6K) http://127.0.0.1/Piwik-Dev/libs/jquery/tooltip/jquery.tooltip.js (1.8K) http://127.0.0.1/Piwik-Dev/libs/jquery/jquery.scrollTo.js (19.4K) http://127.0.0.1/Piwik-Dev/libs/jquery/jquery-calendar.js (7.1K) http://127.0.0.1/Piwik-Dev/libs/swfobject/swfobject.js (29.0K) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/datatable.js (4.0K) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/calendar.js (2.4K) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/date.js (7.2K) http://127.0.0.1/Piwik-Dev/libs/jquery/jquery.blockUI.js (6.3K) http://127.0.0.1/Piwik-Dev/libs/jquery/ui.mouse.js (7.2K) http://127.0.0.1/Piwik-Dev/libs/jquery/ui.sortable_modif.js (4.7K) http://127.0.0.1/Piwik-Dev/libs/jquery/superfish_modified.js (2.4K) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/menu.js (12.0K) http://127.0.0.1/Piwik-Dev/libs/jquery/thickbox.js (7.1K) http://127.0.0.1/Piwik-Dev/piwik.js (5.7K) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/datatable.css (2.4K) http://127.0.0.1/Piwik-Dev/plugins/Dashboard/templates/dashboard.css (3.0K) http://127.0.0.1/Piwik-Dev/libs/jquery/jquery-calendar.css (1.9K) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/menu.css (4.5K) http://127.0.0.1/Piwik-Dev/libs/jquery/thickbox.css

```

5. Put CSS at the top – Grade:A

6. Put JS at the bottom – Grade:A

7. Avoid CSS expressions – Grade:B

```
4 rules containing “expression” were found across all the CSS text.

http://127.0.0.1/Piwik-Dev/libs/jquery/thickbox.css (4)

```

8. Make JS and CSS external – Grade:n/a

```
Only consider this if your property is a common user home page.
```

9. Reduce DNS lookups – Grade:A

10. Minify JS – Grade:F

```
The following JavaScript files do not appear to be obfuscated nor minified.

(1.4K) http://127.0.0.1/Piwik-Dev/themes/default/common.js (29.0K) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/datatable.js (4.0K) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/calendar.js (2.4K) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/date.js (7.2K) http://127.0.0.1/Piwik-Dev/libs/jquery/ui.sortable_modif.js (4.7K) http://127.0.0.1/Piwik-Dev/libs/jquery/superfish_modified.js (2.4K) http://127.0.0.1/Piwik-Dev/plugins/Home/templates/menu.js (7.1K) http://127.0.0.1/Piwik-Dev/piwik.js

```

11. Avoid redirects – Grade:A

12. Remove duplicate scripts – Grade:A

13. Configure ETags – Grade:F

Overall Grade F(40)

MoreInformation at:[Best Practices for Speeding Up Your Web Site](http://developer.yahoo.com/performance/rules.html)

@anonymous-matomo-user
Copy link

My ideas for improvements

Point 1: I think it is not useful to merge the JS and CSS files to two big files, because the readability of the code decreases and it becomes more difficult to understand the code.

Point 2: Negligible at the current state

Point 3,4: Can only be achieved by server configuration

Point 10: I think we should a least create minified versions of our own js-files. Any suggestions for a good js minifier?

Point 13: Can only be achieved by the server configuration

@mattab
Copy link
Member Author

mattab commented May 18, 2008

The only point seems to be point 10. At this stage, but such a thing has to be done at build time, or in a post commit hook. We could open a ticket for this if we decide to implement it.

At the current stage, I suggest there is not much we can do that Yslow! advises us.

Thanks Christian for the analysis :)

@anonymous-matomo-user
Copy link

I’ve already mentioned this in an email to the core developer team, but may a customized [PHP Speedy](http://aciddrop.com/php-speedy/) be a solution to points 1 + 10?
Without loosing readability

@mattab
Copy link
Member Author

mattab commented Feb 2, 2009

ticket done. Created #533 to followup our findings

@mattab mattab added this to the Piwik 0.9.9 - Stable release milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants