Днес цял ден чета
документацията. И вече съм тотално объркан какво става. Когато тествам сайта си със
Page Speed-а той ми реве:
There is 201kB worth of JavaScript. Minifying could save 56kB (27.8% reduction).
* Minifying http://example.com/static/jquery.form.js using JSMin could save 23.7kB (74.4% reduction). See minified version.
* Minifying http://example.com/static/jquery.dimensions.js using JSMin could save 15kB (64.3% reduction). See minified version.
* Minifying http://example.com/static/json2.js using JSMin could save 7.8kB (80.8% reduction). See minified version.
* Minifying http://example.com/static/interface.js using JSMin could save 2.6kB (20% reduction). See minified version.
* Minifying http://example.com/static/form_handler.js using JSMin could save 2.2kB (26.8% reduction). See minified version.
* Minifying http://example.com/static/component_handler.js using JSMin could save 1.2kB (29.3% reduction). See minified version.
* Minifying http://example.com/components/IndexProfileList.cmp.js using JSMin could save 1.1kB (23.1% reduction). See minified version.
* Minifying http://example.com/components/IndexPhotoList.cmp.js using JSMin could save 1.1kB (23% reduction). See minified version.
* Minifying http://example.com/static/jquery.js using JSMin could save 257 bytes (0.5% reduction). See minified version.
* Minifying http://example.com/static/swfobject.js using JSMin could save 237 bytes (3.4% reduction). See minified version.
* Minifying http://example.com/components/VideoPlayer.cmp.js using JSMin could save 212 bytes (20.2% reduction). See minified version.
* Minifying http://example.com/components/BlogIndexList.cmp.js using JSMin could save 179 bytes (18% reduction). See minified version.
* Minifying http://example.com/components/SignIn.cmp.js using JSMin could save 158 bytes (24.2% reduction). See minified version.
* Minifying http://example.com/components/IndexVideo.cmp.js using JSMin could save 148 bytes (16.4% reduction). See minified version.
* Minifying http://example.com/$external_c/ds/%25%25C2/C21/C21D8BEB%25%25form_SignIn.js using JSMin could save 118 bytes (17.2% reduction). See minified version.
* Minifying http://example.com/$external_c/ds/%25%2562/622/622D9B8F%25%25form_ForgotPassword.js using JSMin could save 64 bytes (15.8% reduction). See minified version.
* Minifying http://www.google-analytics.com/ga.js using JSMin could save 37 bytes (0.2% reduction). See minified version.
Проблема мисля че идва от последните два файла, които съм удебелил. Когато пробвам да ги отворя в браузъра виждам тяхното съдържание а реално на сървъра съществуват под други имена. Файла
http://example.com/$external_c/ds/%25%25C2/C21/C21D8BEB%25%25form_SignIn.js на сървъра се намира във
/var/www/example.com/\$external_c/ds/%%62/622/622D9B8F%%form_ForgotPassword.jsА файла
http://example.com/$external_c/ds/%25%25C2/C21/C21D8BEB%25%25form_SignIn.js на сървъра се намира в
/var/www/example.com/\$external_c/ds/%%C2/C21/C21D8BEB%%form_SignIn.jsКогато пробвам в браузъра:
http://example.com/$external_c/ds/%%62/622/622D9B8F%%form_ForgotPassword.js
или
http://example.com/$external_c/ds/%%C2/C21/C21D8BEB%%form_SignIn.js
Получавам:
Bad Request
Your browser sent a request that this server could not understand.
Сменям .htaccess-а по този начин:
<IfModule mod_expires.c>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
ExpiresActive On
ExpiresDefault "access plus 10 years"
</FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ navigation.php
RewriteRule .* - [E=HTTP_X_REQUESTED_WITH:%{HTTP:X-Requested-With}]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1
<IfModule mod_expires.c>
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1
</IfModule>
<IfModule !mod_expires.c>
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt))$ smartoptimizer/?$1
</IfModule>
</IfModule>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
FileETag none
</FilesMatch>
При опит да достъпя:
http://dev.polovinka.bg/$external_c/ds/%25%25C2/C21/C21D8BEB%25%25form_SignIn.js
http://dev.polovinka.bg/$external_c/ds/%25%2562/622/622D9B8F%25%25form_ForgotPassword.js
Получавам:
SmartOptimizer Error: File is out of base directory.
Иначе при опит да достъпя всички други файлове изброени от Page Speed-а виждам тяхното минимизирано съдържание.
Някой може ли да ме насочи какво се случва?