提供压缩版prototype.js下载

Magento采用prototype作为它的核心JS库,而prototype.js文件有127KB之大,因为是核心库,相信也没有人会需要去改它的源代码,既然这样,我们可以改为导入压缩后的核心文件,为前台网页载入减轻一点负担。
下面是本人自己压缩的核心库,欢迎下载试用

解压后把prototype.min.js放置到\js\prototype目录下,同时修改文件\app\design\frontend\default\yourtheme\layout\page.xml,


<action method=”addJs”><script>prototype/prototype.min.js</script></action>
替换
<action method=”addJs”><script>prototype/prototype.js</script></action>

大概可以为页面节省80KB的大小

标签


Warning: error_log(/www/wwwroot/www.ctrol.cn/wp-content/plugins/spider-analyser/#log/log-0404.txt): failed to open stream: No such file or directory in /www/wwwroot/www.ctrol.cn/wp-content/plugins/spider-analyser/spider.class.php on line 2900