Seite 2 von 2 ErsteErste 12
Ergebnis 41 bis 52 von 52

Thema: Fragen zum privaten Cache (Browsercache)

  1. #41
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Vienna, Austria
    Beiträge
    23.677
    Partner-ID
    10107
    User beschenken
    Wunschliste

    Standard

    Nachdem du cookieconsent_status nun auf die whitelist gesetzt hast, veranlasst du, dass die Seite nie aus dem Cache geladen wird, wenn das Cookie vorhanden ist.

  2. #42
    Contao-Nutzer Avatar von Der Astronaut
    Registriert seit
    20.07.2012.
    Ort
    Weltall
    Beiträge
    234

    Standard

    Zitat Zitat von Spooky Beitrag anzeigen
    Nachdem du cookieconsent_status nun auf die whitelist gesetzt hast, veranlasst du nun, dass die Seite nie aus dem Cache geladen wird, wenn das Cookie vorhanden ist.
    Ok, von welcher Anpassung sprichst du denn dann?

  3. #43
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Vienna, Austria
    Beiträge
    23.677
    Partner-ID
    10107
    User beschenken
    Wunschliste

    Standard

    Von der COOKIE_WHITELIST.

  4. #44
    Contao-Nutzer Avatar von Der Astronaut
    Registriert seit
    20.07.2012.
    Ort
    Weltall
    Beiträge
    234

    Standard

    Zitat Zitat von Spooky Beitrag anzeigen
    Von der COOKIE_WHITELIST.
    Also darf "cookieconsent_status" gar nicht erst drinnen stehen?

  5. #45
    Contao-Nutzer
    Registriert seit
    05.12.2009.
    Beiträge
    25

    Standard

    Zitat Zitat von Der Astronaut Beitrag anzeigen
    Also darf "cookieconsent_status" gar nicht erst drinnen stehen?
    Genau, denn das Cookie "cookieconsent_status" ist für Contao nicht relevant.

    Wobei das schon einen Schritt weiter gedacht ist, denn auch wenn noch keine Cookies vorhanden sind, wird bei deiner Seite "contao-cache: miss" zurückgegeben.

  6. #46
    Contao-Nutzer Avatar von Der Astronaut
    Registriert seit
    20.07.2012.
    Ort
    Weltall
    Beiträge
    234

    Standard

    Ja, es funktioniert nur trotzdem nicht...

  7. #47
    Contao-Nutzer
    Registriert seit
    05.12.2009.
    Beiträge
    25

    Standard

    Hast du dich denn zwischenzeitlich um die veraltete .htaccess gekümmert?

  8. #48
    Contao-Nutzer Avatar von Der Astronaut
    Registriert seit
    20.07.2012.
    Ort
    Weltall
    Beiträge
    234

    Standard

    Ja, sieht jetzt so aus:

    Code:
    ##
    # Configs Server
    ##
    
    #AddHandler php56-cgi .php
    php_value memory_limit 512M
    php_value max_execution_time 600
    AddDefaultCharset UTF-8
    php_value session.save_path /www/htdocs/w012345/tmp/
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        ##
        # Uncomment the following lines to add "www." to the domain:
        #
        #   RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
        #   RewriteRule (.*) http://www.example.com/$1 [R=301,L]
        #
        # Uncomment the following lines to remove "www." from the domain:
        #
           RewriteCond %{HTTP_HOST} ^www\.expample\.de$ [NC]
           RewriteRule (.*) http://example.de/$1 [R=301,L]
        #
        # Make sure to replace "example.com" with your domain name.
        ##
    
    
        ##
        # Set the proper MIME types
        # @see https://github.com/h5bp/html5-boilerplate
        ##
        <IfModule mod_mime.c>
          AddType application/javascript              js jsonp
          AddType application/json                    json
          AddType audio/ogg                           oga ogg
          AddType audio/mp4                           m4a f4a f4b
          AddType video/ogg                           ogv
          AddType video/mp4                           mp4 m4v f4v f4p
          AddType video/webm                          webm
          AddType video/x-flv                         flv
          AddType image/svg+xml                       svg svgz
          AddEncoding gzip                            svgz
          AddType application/vnd.ms-fontobject       eot
          AddType application/x-font-ttf              ttf ttc
          AddType font/opentype                       otf
          AddType application/x-font-woff             woff woff2
          AddType image/x-icon                        ico
          AddType image/webp                          webp
          AddType text/cache-manifest                 appcache manifest
          AddType text/x-component                    htc
          AddType application/xml                     rss atom xml rdf
          AddType application/x-web-app-manifest+json webapp
          AddType text/x-vcard                        vcf
          AddType application/x-shockwave-flash       swf
        </IfModule>
    
    
        ##
        # Gzip compression
        # @see https://github.com/h5bp/html5-boilerplate
        ##
        <IfModule mod_deflate.c>
          <IfModule mod_filter.c>
            AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
            AddOutputFilterByType DEFLATE application/javascript
            AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
            AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
            AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
          </IfModule>
        </IfModule>
    
        ##
        # Expires headers (for better cache control)
        # @see https://github.com/h5bp/html5-boilerplate
        ##
        <IfModule mod_expires.c>
          ExpiresActive on
    
          ##
          # Productional website
          ##
          ExpiresByType text/cache-manifest           "access plus 0 seconds"
          #ExpiresByType text/html                     "access plus 0 seconds"
          ExpiresByType text/xml                      "access plus 0 seconds"
          ExpiresByType application/xml               "access plus 0 seconds"
          ExpiresByType application/json              "access plus 0 seconds"
          ExpiresByType application/rss+xml           "access plus 1 hour"
          ExpiresByType application/atom+xml          "access plus 1 hour"
          ExpiresByType image/gif                     "access plus 1 month"
          ExpiresByType image/png                     "access plus 1 month"
          ExpiresByType image/jpg                     "access plus 1 month"
          ExpiresByType image/jpeg                    "access plus 1 month"
          ExpiresByType image/x-icon                  "access plus 1 month"
          ExpiresByType video/ogg                     "access plus 1 month"
          ExpiresByType audio/ogg                     "access plus 1 month"
          ExpiresByType video/mp4                     "access plus 1 month"
          ExpiresByType video/webm                    "access plus 1 month"
          ExpiresByType text/x-component              "access plus 1 month"
          ExpiresByType application/x-font-ttf        "access plus 1 month"
          ExpiresByType font/opentype                 "access plus 1 month"
          ExpiresByType application/x-font-woff       "access plus 1 month"
          ExpiresByType image/svg+xml                 "access plus 1 month"
          ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
          ExpiresByType text/css                      "access plus 1 month"
          ExpiresByType application/javascript        "access plus 1 month"
          #ExpiresByType text/css                      "access plus 1 year"
          #ExpiresByType application/javascript        "access plus 1 year"
    
          ##
          # Disable caching during development
          # @see https://github.com/contao/core/issues/4364
          ##
          #ExpiresByType text/cache-manifest           "access"
          #ExpiresByType text/html                     "access"
          #ExpiresByType text/xml                      "access"
          #ExpiresByType application/xml               "access"
          #ExpiresByType application/json              "access"
          #ExpiresByType application/rss+xml           "access"
          #ExpiresByType application/atom+xml          "access"
          #ExpiresByType image/gif                     "access"
          #ExpiresByType image/png                     "access"
          #ExpiresByType image/jpeg                    "access"
          #ExpiresByType image/x-icon                  "access"
          #ExpiresByType video/ogg                     "access"
          #ExpiresByType audio/ogg                     "access"
          #ExpiresByType video/mp4                     "access"
          #ExpiresByType video/webm                    "access"
          #ExpiresByType text/x-component              "access"
          #ExpiresByType application/x-font-ttf        "access"
          #ExpiresByType font/opentype                 "access"
          #ExpiresByType application/x-font-woff       "access"
          #ExpiresByType image/svg+xml                 "access"
          #ExpiresByType application/vnd.ms-fontobject "access"
          #ExpiresByType text/css                      "access"
          #ExpiresByType application/javascript        "access"
    
        </IfModule>
    
        <IfModule mod_headers.c>
          <FilesMatch "\.(js|css|xml|gz|html)$">
            Header append Vary: Accept-Encoding
          </FilesMatch>
        </IfModule>
    
        <IfModule mod_headers.c>
            # Assets in /assets and /bundles either contain a hash in their filename
            # or are called with a ?version suffix, therefore cache them for 1 year.
            RewriteRule ^(assets|bundles)/ - [ENV=CONTAO_ASSETS:true]
            Header set Cache-Control "max-age=31536000" env=CONTAO_ASSETS
    
            # Allow CORS on the Contao TinyMCE skin.
            RewriteRule ^assets/tinymce4/js/skins/contao/fonts/ - [ENV=CONTAO_TINYMCE_SKIN:true]
            Header set Access-Control-Allow-Origin "*" env=CONTAO_TINYMCE_SKIN
        </IfModule>
    
        # Determine the RewriteBase automatically and set it as environment variable.
        # If you are using Apache aliases to do mass virtual hosting or installed the
        # project in a subdirectory, the base path will be prepended to allow proper
        # resolution of the index.php file and to redirect to the correct URI. It will
        # work in environments without path prefix as well, providing a safe, one-size
        # fits all solution. But as you do not need it in this case, you can comment
        # the following 2 lines to eliminate the overhead.
        RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
        RewriteRule ^(.*) - [E=BASE:%1]
    
        # Sets the HTTP_AUTHORIZATION header removed by Apache
        RewriteCond %{HTTP:Authorization} .
        RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        # Redirect to URI without front controller to prevent duplicate content
        # (with and without `/index.php`). Only do this redirect on the initial
        # rewrite by Apache and not on subsequent cycles. Otherwise we would get an
        # endless redirect loop (request -> rewrite to front controller ->
        # redirect -> request -> ...).
        # So in case you get a "too many redirects" error or you always get redirected
        # to the start page because your Apache does not expose the REDIRECT_STATUS
        # environment variable, you have 2 choices:
        # - disable this feature by commenting the following 2 lines or
        # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
        #   following RewriteCond (best solution)
        RewriteCond %{ENV:REDIRECT_STATUS} ^$
        RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
    
        # If the requested filename exists, simply serve it.
        # We only want to let Apache serve files and not directories.
        RewriteCond %{REQUEST_FILENAME} -f
        RewriteRule ^ - [L]
    
        # Rewrite all other queries to the front controller.
        RewriteRule ^ %{ENV:BASE}/index.php [L]
    </IfModule>
    
    <IfModule !mod_rewrite.c>
        <IfModule mod_alias.c>
            # When mod_rewrite is not available, we instruct a temporary redirect of
            # the start page to the front controller explicitly so that the website
            # and the generated links can still be used.
            RedirectMatch 302 ^/$ /index.php/
            # RedirectTemp cannot be used instead
        </IfModule>
    </IfModule>

  9. #49
    Contao-Nutzer
    Registriert seit
    05.12.2009.
    Beiträge
    25

    Standard

    Welchen Inhalt hat deine composer.json?

  10. #50
    Contao-Nutzer Avatar von Der Astronaut
    Registriert seit
    20.07.2012.
    Ort
    Weltall
    Beiträge
    234

    Standard

    Code:
    {
        "type": "project",
        "require": {
            "contao/calendar-bundle": "4.9.*",
            "contao/comments-bundle": "4.9.*",
            "contao/conflicts": "*@dev",
            "contao/faq-bundle": "4.9.*",
            "contao/listing-bundle": "4.9.*",
            "contao/manager-bundle": "4.9.*",
            "contao/news-bundle": "4.9.*",
            "contao/newsletter-bundle": "4.9.*",
            "jrgregory/m17-sticky-backend-footer": "^2.0"
        },
        "extra": {
            "contao-component-dir": "assets"
        },
        "scripts": {
            "post-install-cmd": [
                "Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
            ],
            "post-update-cmd": [
                "Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
            ]
        }
    }

  11. #51
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Vienna, Austria
    Beiträge
    23.677
    Partner-ID
    10107
    User beschenken
    Wunschliste

    Standard

    Wie sehen deine Cache Einstellungen aus? Im Response deiner Website wird nun nur der Browser Cache benutzt.
    Code:
    $ curl -I https://derastronaut.de
    HTTP/2 200
    date: Sat, 23 May 2020 09:39:16 GMT
    server: Apache
    contao-merge-cache-control: 1
    cache-control: max-age=3600, private
    vary: Cookie,Accept-Encoding,User-Agent
    x-content-type-options: nosniff
    referrer-policy: no-referrer-when-downgrade, strict-origin-when-cross-origin
    x-frame-options: SAMEORIGIN
    x-xss-protection: 1; mode=block
    contao-cache: miss
    age: 0
    strict-transport-security: max-age=31536000
    content-length: 35257
    content-type: text/html; charset=utf-8

  12. #52
    Contao-Nutzer Avatar von Der Astronaut
    Registriert seit
    20.07.2012.
    Ort
    Weltall
    Beiträge
    234

    Standard

    Zitat Zitat von Der Astronaut Beitrag anzeigen
    Im Startpunkt festgelegt, an alle Unterseiten vererbt.

Seite 2 von 2 ErsteErste 12

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •