• 12-02-2019, 22:02:57
    #1
    Merhaba arkadaslar bi sitem açılış skoru ne yaptıysam %16 gecemedi sunucum çok iyi olmasına rağmen bende site açılmasını hızlandırmak icin css ve js dosyalarını .gzip ile sıkıştırdım .gz olarak çektim ama ne css leri ne js leri okuyor .httacces de koydum SyntaxError: Invalid or unexpected token hatası alıyorum anlamadım gitti olayı neden okumuyor sizce


    örnek :
    css:
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.css.gz" >

    js :
    <script type="text/javascript" src="../js/afterglow.min.js.gz"></script>

    .httacces kodu

    <IfModule mod_headers.c>
    # Serve gzip compressed CSS files if they exist
    # and the client accepts gzip.
    RewriteCond "%{HTTP:Accept-encoding}" "gzip"
    RewriteCond "%{REQUEST_FILENAME}\.gz" -s
    RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA]

    # Serve gzip compressed JS files if they exist
    # and the client accepts gzip.
    RewriteCond "%{HTTP:Accept-encoding}" "gzip"
    RewriteCond "%{REQUEST_FILENAME}\.gz" -s
    RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]


    # Serve correct content types, and prevent mod_deflate double gzip.
    RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1]
    RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1]


    <FilesMatch "(\.js\.gz|\.css\.gz)$">
    # Serve correct encoding type.
    Header append Content-Encoding gzip

    # Force proxies to cache gzipped &
    # non-gzipped css/js files separately.
    Header append Vary Accept-Encoding
    </FilesMatch>
    </IfModule>
  • 13-02-2019, 08:13:14
    #2
    Sunucunuz üzerinde gzip aktif mi ?
  • 14-02-2019, 00:19:19
    #3
    aktif hocam
  • 14-02-2019, 06:50:09
    #4
    mod_headers.c falan da aktif mi?

    a2enmod headers
  • 14-02-2019, 21:42:48
    #5
    hepsi aktif hocam ama ne yaptıysak olmadı .gz leri çalıştırtamadık bizde deflate ile yaptık hocam geçici olarak.
    • OKKODE
    OKKODE bunu beğendi.
    1 kişi bunu beğendi.