Solved: cache check wasn't possible

hey guys,

im stuck on it.

my website is : https://weinschenke-pfeiffer.at/

have made every step by step for the settings with cloudflare and swift performance
https://onlinemediamasters.com/swift-performance-settings/#comments


connection to cloudflare should be also fine.

issue is that i can’t cache even though every setting should be ok.

plugins are swift performance lite and autoptimize.

could be a reason, that i didnt set any rage rules?

thanks in advance for help.

regards from austria.

Manuel

I am afraid I am not quite sure what the issue is. That reports looks pretty good and resources are cached as well. What exactly do you believe you cant cache?

according to google chrome devtools caching is not possible.
“cache-control: no-cache, must-revalidate, max-age=0”

am i wrong?

if i choose a other direction (not EU) it takes much more time.

That caching directive presumably comes from your server. I’d check there.

However, yes, you could override these headers with a page rule as well. Though your resources are cached all right on Cloudflare’s edges and in the browser. It seems to be specific to your main document.

thanks for help sandro.
have sent a request to my hoster.

how can i override these headers?

what are you meaning with main document?

sry for that stupid question.

No worries :slight_smile:

By main document I was referring to the document at your root URL “/”.

As for the page rule, the following could be a start

thanks sandro.

Could you reformat this? Place everything between two ``` tags. Currently that is pretty much unintelligible :wink:

> ###BEGIN Swift Performance Lite###
> # ------------------------------------------------------------------------------
> # | Compression                                                                |
> # ------------------------------------------------------------------------------
> <IfModule mod_deflate.c>
> 
>     # Force compression for mangled headers.
>     # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
>     <IfModule mod_setenvif.c>
>         <IfModule mod_headers.c>
>             SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
>             RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
>         </IfModule>
>     </IfModule>
> 
>     # Compress all output labeled with one of the following MIME-types
>     # (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
>     #  and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines
>     #  as `AddOutputFilterByType` is still in the core directives).
>     <IfModule mod_filter.c>
>        AddOutputFilterByType DEFLATE "application/atom+xml" \
>                                   "application/javascript" \
>                                   "application/json" \
>                                   "application/ld+json" \
>                                   "application/manifest+json" \
>                                   "application/rdf+xml" \
>                                   "application/rss+xml" \
>                                   "application/schema+json" \
>                                   "application/vnd.geo+json" \
>                                   "application/vnd.ms-fontobject" \
>                                   "application/x-font-ttf" \
>                                   "application/x-javascript" \
>                                   "application/x-web-app-manifest+json" \
>                                   "application/xhtml+xml" \
>                                   "application/xml" \
>                                   "font/eot" \
>                                   "font/opentype" \
>                                   "image/bmp" \
>                                   "image/svg+xml" \
>                                   "image/vnd.microsoft.icon" \
>                                   "image/x-icon" \
>                                   "text/cache-manifest" \
>                                   "text/css" \
>                                   "text/html" \
>                                   "text/javascript" \
>                                   "text/plain" \
>                                   "text/vcard" \
>                                   "text/vnd.rim.location.xloc" \
>                                   "text/vtt" \
>                                   "text/x-component" \
>                                   "text/x-cross-domain-policy" \
>                                   "text/xml"
>     </IfModule>
> 
> </IfModule>
> 
> # ------------------------------------------------------------------------------
> # | Expires headers (for better cache control)                                 |
> # ------------------------------------------------------------------------------
> <IfModule mod_expires.c>
>     ExpiresActive on
>     ExpiresDefault                                      "access plus 1 month"
> 
>   # CSS
>     ExpiresByType text/css                              "access plus 1 year"
> 
>   # Data interchange
>     ExpiresByType application/json                      "access plus 0 seconds"
>     ExpiresByType application/xml                       "access plus 0 seconds"
>     ExpiresByType text/xml                              "access plus 0 seconds"
> 
>   # Favicon (cannot be renamed!)
>     ExpiresByType image/x-icon                          "access plus 1 week"
> 
>   # HTML components (HTCs)
>     ExpiresByType text/x-component                      "access plus 1 month"
> 
>   # HTML
>     ExpiresByType text/html                             "access plus 0 seconds"
> 
>   # JavaScript
>     ExpiresByType application/javascript                "access plus 1 year"
> 
>   # Manifest files
>     ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
>     ExpiresByType text/cache-manifest                   "access plus 0 seconds"
> 
>   # Media
>     ExpiresByType audio/ogg                             "access plus 1 month"
>     ExpiresByType image/gif                             "access plus 1 month"
>     ExpiresByType image/jpeg                            "access plus 1 month"
>     ExpiresByType image/png                             "access plus 1 month"
>     ExpiresByType video/mp4                             "access plus 1 month"
>     ExpiresByType video/ogg                             "access plus 1 month"
>     ExpiresByType video/webm                            "access plus 1 month"
> 
>   # Web feeds
>     ExpiresByType application/atom+xml                  "access plus 1 hour"
>     ExpiresByType application/rss+xml                   "access plus 1 hour"
> 
>   # Web fonts
>     ExpiresByType application/font-woff                 "access plus 1 month"
>     ExpiresByType application/font-woff2                "access plus 1 month"
>     ExpiresByType application/vnd.ms-fontobject         "access plus 1 month"
>     ExpiresByType application/x-font-ttf                "access plus 1 month"
>     ExpiresByType font/opentype                         "access plus 1 month"
>     ExpiresByType image/svg+xml                         "access plus 1 month"
> 
> </IfModule>
> 
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_METHOD} !POST
> RewriteCond %{QUERY_STRING} ^$
> RewriteCond %{HTTP:Cookie} !^.*(wordpress_logged_in).*$
> RewriteCond %{REQUEST_URI} !^/wp-content/cache/swift-performance/([^/]*)/assetproxy
> RewriteCond /www/htdocs/w019076a/weinschenke-pfeiffer.at/wp-content/cache/swift-performance/%{HTTP_HOST}%{REQUEST_URI}/desktop/unauthenticated/index.html -f
> RewriteRule (.*) wp-content/cache/swift-performance/%{HTTP_HOST}%{REQUEST_URI}/desktop/unauthenticated/index.html [L]
> </IfModule>
> 
> # ----------------------------------------------------------------------
> # CORS-enabled images (@crossorigin)
> # ----------------------------------------------------------------------
> # Send CORS headers if browsers request them; enabled by default for images.
> # developer.mozilla.org/en/CORS_Enabled_Image
> # blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
> # hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
> # wiki.mozilla.org/Security/Reviews/crossoriginAttribute
> <IfModule mod_setenvif.c>
>   <IfModule mod_headers.c>
>     # mod_headers, y u no match by Content-Type?!
>     <FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$">
>       SetEnvIf Origin ":" IS_CORS
>       Header set Access-Control-Allow-Origin "*" env=IS_CORS
>     </FilesMatch>
>   </IfModule>
> </IfModule>
> # ----------------------------------------------------------------------
> # Webfont access
> # ----------------------------------------------------------------------
> # Allow access from all domains for webfonts.
> # Alternatively you could only whitelist your
> # subdomains like "subdomain.example.com".
> <IfModule mod_headers.c>
>   <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
>     Header set Access-Control-Allow-Origin "*"
>   </FilesMatch>
> </IfModule>
> 
> ###END Swift Performance Lite###
> php_flag log_errors on
> php_value error_log /www/htdocs/w019076a/errorlog.txt
> 
> 
> php_value memory_limit 1024M
> php_value max_input_vars 10000
> 
> 
> 
> # BEGIN WordPress
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteBase /
> RewriteRule ^index\.php$ - [L]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /index.php [L]
> </IfModule>
> 
> # END WordPress
> 

now it works :wink:

my hoster told me, that they didn’t set anything.
they guess it must be plugin issue.

Try commenting out

 ExpiresByType text/html                             "access plus 0 seconds"

That seems to instruct the browser to expire HTML content straight away.

Unfortunately nothing has changed :confused:

Where did you take that configuration from? You might have to restart your webserver.

And your browser’s language is set incorrectly :wink: :smile:

good question … :wink:

maybe via plugins/template (autoptimize, swift performance lite, generate press)?

language should be german. i am an austian guy :wink:

Where did you get these entries from? If this was the server configuration you need to restart the service in order for changes to take any effect.

As for the language, yep, thats what I was referring to. Shouldnt it be “de-AT”, if not actually “at” :wink:

It’s looking good over here.
image

youre right :wink:
im at work, computer without admin permission. cant change it here :wink:

ive got these entries via google chrome development.

maybe the information was wrong … or something updated …

cause if i now make a test via gmetrix in china, the score is good.

thanks so much for your help sandor

@jules: thanks for help as well.
is it not possible to see the cf-cache-status on the main entry?

it seems to bee that was the issue all over the time :wink:

I’d generally say your site is loading fine. I wouldnt focus too much on those arbitrary scores.

once again thanks to you both.
next beer will think about you two :wink:

Shouldnt that rather be a glass of wine in your case? :smile: