[TYPO3-UG Freiburg] nicht nachvollziehbare IE-Probleme

Heiko Hänsge mailinglisten at wild-wild-web.de
Fri Apr 4 10:15:01 CEST 2014


Hallo Steffen,

zwei Dinge sind mir aufgefallen:

1. setze ich den [FE][compressionLevel] auf einen anderen Wert als 0, 
also z.B. auf 5, steht in der komprimierten CSS-Datei nur noch 
Zeichensalat, als ob etwas mit dem Zeichensatz nicht stimmt.

2. wenn die Ext. aktiviert ist, hat die gezippte statische Datei am 
Anfang und am Ende jeweils einige kryptische Zeichen, als ob etwas mit 
dem Zeichensatz nicht stimmt. Des weiteren werden im Ordner 
/typo3temp/tx_ncstaticfilecache offensichtlich keine Dateien abgelegt.

Im TS-Setup steht u.a. Folgendes:
...
config {
     renderCharset = utf-8
     metaCharset = utf-8

     inlineStyle2TempFile = 1

     minifyJS = 1
     minifyCss = 1

     concatenateJs = 1
     concatenateCss = 1

     compressJs = 1
     compressCss = 1

     sendCacheHeaders = 1
     meaningfulTempFilePrefix = 100
}

In der .htaccess steht Folgendes:
#################################################################################
### Begin: Rewrite stuff ###

# Enable URL rewriting
RewriteEngine On

# To assist in debugging rewriting, you could use these lines
# DON'T enable it for production!
# This will only work in httpd.conf, not in .htaccess files
#RewriteLog /var/log/apache/rewrite.log
#RewriteLogLevel 9

# If you use the RealUrl extension, then you'll have to enable the next 
line.
# You will have to change this path if your TYPO3 installation is located
# in a subdirectory of the website root.
#
# If you place this in httpd.conf, you cannot use this directive in any 
case!
#RewriteBase /

# Stop rewrite processing if we are in the typo3/ directory
# For httpd.conf, use this line instead of the next one:
# RewriteRule 
^/TYPO3root/(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/ 
- [L]
RewriteRule 
^(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/ 
- [L]

# Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
# and stop the rewrite processing
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]
RewriteRule ^typo3$ typo3/index_re.php [L]

# If the file/symlink/directory does not exist => Redirect to index.php
# Important note: If you copy/paste this into httpd.conf instead
# of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
# '%{REQUEST_FILENAME}' part.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

# from example /typo3conf/ext/nc_staticfilecache/doc/gzip.realurl.htaccess

# Do not rewrite any static resources
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule .* - [L]

#------------------------------------------------------------------------------
# beginning of static file cache rulesets

# Set gzip extension into an environment variable if the visitors 
browser can handle gzipped content.
RewriteCond %{HTTP:Accept-Encoding} gzip [NC]
RewriteRule .* - [E=TX_NCSTATICFILECACHE_GZIP:.gz]


# Don't cache HTTPS traffic. You may choose to comment out this
# option if your site runs fully on https. If your site runs mixed, you will
# not want https traffic to be cached in the same typo3temp folder where 
it can
# be requested over http.
# Enable this if you use a mixed setup.
#RewriteCond %{HTTPS} off

# We only redirect URI's without query strings
RewriteCond %{QUERY_STRING} ^$

# It only makes sense to do the other checks if a static file actually 
exists.
# in case of problems try next line
# RewriteCond 
/full_server_path_to_project/typo3temp/tx_ncstaticfilecache/%{HTTP_HOST}%{REQUEST_URI}/index.html%{ENV:TX_NCSTATICFILECACHE_GZIP} 
-f
#RewriteCond 
/absoluter-Server-Pfad/typo3temp/tx_ncstaticfilecache/%{HTTP_HOST}%{REQUEST_URI}/index.html%{ENV:TX_NCSTATICFILECACHE_GZIP} 
-f
RewriteCond 
%{DOCUMENT_ROOT}/typo3temp/tx_ncstaticfilecache/%{HTTP_HOST}/%{REQUEST_URI}index.html%{ENV:TX_NCSTATICFILECACHE_GZIP} 
-f

# NO frontend user is logged in. Logged in frontend users may see different
# information than anonymous users. But the anonymous version is cached. So
# don't show the anonymous version to logged in frontend users.
RewriteCond %{HTTP_COOKIE} !nc_staticfilecache [NC]

# Uncomment the following line if you use MnoGoSearch
#RewriteCond %{HTTP:X-TYPO3-mnogosearch} ^$

# We only redirect GET requests
RewriteCond %{REQUEST_METHOD} GET

# NO backend user is logged in. Please note that the be_typo_user cookie 
expires at the
# end of the browser session. If you have logged out of the TYPO3 
backend and are expecting to see cached pages but don't. Please close 
this browser settion first or remove the cookie manually or use another 
browser to hit your frontend.
RewriteCond %{HTTP_COOKIE} !be_typo_user [NC]

# Check for Ctrl Shift reload
RewriteCond %{HTTP:Pragma} !no-cache
RewriteCond %{HTTP:Cache-Control} !no-cache

# Rewrite the request to the static file.
# in case of problems try next line with additional slash: 
%{HTTP_HOST}/%{REQUEST_URI}
# RewriteRule .* 
/typo3temp/tx_ncstaticfilecache/%{HTTP_HOST}%{REQUEST_URI}/index.html%{ENV:TX_NCSTATICFILECACHE_GZIP} 
[L]
RewriteRule .* 
typo3temp/tx_ncstaticfilecache/%{HTTP_HOST}/%{REQUEST_URI}/index.html%{ENV:TX_NCSTATICFILECACHE_GZIP} 
[L]

# Set proper content type and encoding for gzipped html.
<Files *.html.gz>
     ForceType text/html
     <IfModule mod_headers.c>
         Header set Content-Encoding gzip
     </IfModule>
</Files>

# end of static file cache ruleset
#------------------------------------------------------------------------------


# Main URL rewriting.

# If you use Windows and SimulateStaticDocuments do not work, try adding a
# slash (/) right before 'index.php' below.

# The example shows how to rewrite only *.html and *.pdf files to index.php
# This may be helpful when using an extension that can generate PDF files
# on the fly.
# Example: RewriteRule .*\.(html|pdf)$ index.php [L]

# For httpd.conf, use this line instead of the next one that has no '#':
# RewriteRule .* /TYPO3root/index.php [L]

# For use with the RealUrl extension, you might need to remove the
# RewriteBase directive somewhere above and use this line instead of the
# next one:
# RewriteRule .* /index.php [L]

RewriteRule .* index.php [L]

### End: Rewrite stuff ###

### Begin: PHP optimisation ###

# All features below are left to the default if you don't change this.
# Simply remove the comment marks if you want to use some/all of these
# settings

# The PHP developers recommend disabling this feature. Do that.
# It's deprecated and is likely to be unsupported in future versions of PHP.
#php_flag allow_call_time_pass_reference off

# TYPO3 works fine with register_globals turned off.
# This is highly recommended!
#php_flag register_globals off

# PHP may not declare the argv & argc variables (that would contain the GET
# information).
# TYPO3 doesn't need this, so just turn it off.
#php_flag register_argc_argv off

# Magic quotes for runtime-generated data (data from SQL, exec(), etc.)
#php_flag magic_quotes_gpc off

# Order in which PHP registers GET, POST, Cookie and Built-in variables
#php_value variables_order GPCS

### End: PHP optimisation ###

### Begin: Miscellaneous ###

# Make sure that directory listings are disabled
Options -Indexes

# There is a problem with Internet Explorer and mod_gzip on Apache servers.
# For more information, see
# http://typo3.org/documentation/document-library/rtehtmlarea/Tutorial-79/
#mod_gzip_item_exclude file \.css$
#mod_gzip_item_exclude file \.png$
#mod_gzip_item_exclude file \.gif$
#mod_gzip_item_exclude file \.jpg$
#mod_gzip_item_exclude file \.jpeg$
#mod_gzip_item_exclude file \.js$

<FilesMatch "\.js\.gzip$">
#    AddType "text/javascript" .gzip
</FilesMatch>
<FilesMatch "\.css\.gzip$">
#    AddType "text/css" .gzip
</FilesMatch>
#AddEncoding gzip .gzip

<IfModule mod_deflate.c>
     AddOutputFilterByType DEFLATE text/html text/plain text/xml 
text/css text/javascript
     BrowserMatch ^Mozilla/4 gzip-only-text/html
     BrowserMatch ^Mozilla/4\.0[678] no-gzip
     BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
     SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
     Header append Vary User-Agent env=!dont-vary
</IfModule>

# 
http://fortheloveofseo.com/blog/performance/leverage-browser-caching-how-to-add-expires-headers/
# http://gtmetrix.com/add-expires-headers.html
<IfModule mod_expires.c>
     # Enable expirations
     ExpiresActive On
     # Default directive
     ExpiresDefault "access plus 1 week"
     # My favicon
     ExpiresByType image/x-icon "access plus 1 month"
     # Images
     ExpiresByType image/gif "access plus 1 week"
     ExpiresByType image/png "access plus 1 week"
     ExpiresByType image/jpg "access plus 1 week"
     ExpiresByType image/jpeg "access plus 1 week"
     # CSS
     ExpiresByType text/css "access 1 week
     # Javascript
     ExpiresByType application/javascript "access plus 1 week"
</IfModule>

# http://gtmetrix.com/configure-entity-tags-etags.html
FileETag none

### End: Miscellaneous ###
#################################################################################

Ich verwende Typo3 4.7.17 mit RealURL unter PHP5.3.
Vll. siehst du, ob da was schräg eingestellt ist?
Oder hast du eine Konfiguration, mit der das Ganze sicher läuft?

Viele Grüße
Heiko

Fon: +49 761 7048880



------------ Original-Nachricht ------------
Steffen Müller schrieb am 03.04.2014 15:59 Uhr:
> Hi.
>
> On 03.04.2014 15:33 Heiko Hänsge wrote:
>> Es war die nicht korrekt funktionierende Cache-Extension 'Static file
>> cache':
>>
> was funktioniert den nicht korrekt?
> Ich hab die seit Jahren ohne Probleme im Einsatz.
>



More information about the TYPO3-UG-Freiburg mailing list