Magento/PageSpeed: Unterschied zwischen den Versionen
< Magento
Zur Navigation springen
Zur Suche springen
K (bug fix) |
K (m) |
||
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 2: | Zeile 2: | ||
http://www.webpagetest.org | http://www.webpagetest.org | ||
== Add async to JS == | |||
did not work very well. to much js-errors so i removed it | |||
Zeile 25: | Zeile 28: | ||
or add to cart will not work anymore (TypeError: productAddToCartForm is undefined) | or add to cart will not work anymore (TypeError: productAddToCartForm is undefined) | ||
== Add expire == | |||
<syntaxhighlight lang="apache"> | |||
<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$"> | |||
ExpiresActive On | |||
ExpiresDefault A2592000 | |||
</FilesMatch> | |||
</syntaxhighlight> | |||
Zeile 30: | Zeile 41: | ||
[[Kategorie:WWW]] | [[Kategorie:WWW]] | ||
[[Kategorie:Magento]] | |||
[[Kategorie:PHP]] |
Aktuelle Version vom 24. September 2016, 12:49 Uhr
https://developers.google.com/speed/pagespeed/insights/
Add async to JS
did not work very well. to much js-errors so i removed it
in app/design/frontend/base/default/layout/
et_advancedcompare.xml
googleanalyticsplus.xml
page.xml
add <params>async</params> to addJS
WARNING Do NOT add 'async' to
<action method="addJs"><script>prototype/prototype.js</script></action>
...
<action method="addJs"><script>prototype/validation.js</script></action>
..
<action method="addJs"><script>varien/js.js</script></action>
<action method="addJs"><script>varien/form.js</script></action>
or add to cart will not work anymore (TypeError: productAddToCartForm is undefined)
Add expire
<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$">
ExpiresActive On
ExpiresDefault A2592000
</FilesMatch>
see http://stackoverflow.com/questions/28658063/html-script-async-attribute-in-magento