• Resolved werdpres

    (@werdpres)


    1. how does one verify that the htaccess directives are working?

    i’m looking at the net requests and i’m not recognizing a difference with or without the code in htaccess, but i’m not sure what i should be looking for

    the number of file requests and time to load is essentially the same

    2. WP is installed in the web root and i’m not using webp, so does any of the code need to be commented out?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Anonymous User 16850768

    (@anonymized-16850768)

    You can verify if the advanced snippet is bypassing PHP by checking your page response headers. If the X-Cache-Handler: wp response header is present then it’s been properly implemented.

    If you’re not using the Cache Enabler plugin to deliver WebP formatted images you can optionally comment out (or remove) the # webp HTML file section.

    Thread Starter werdpres

    (@werdpres)

    ah, ok, i saw it in the docs now … might want to move the “How can I verify …” part to the “Advanced Configuration” section perhaps ??

    also i think you got it backwards at keycdn…

    “If the X-Cache-Handler header is not present, then your advanced configuration snippet is properly implemented.”

    Anonymous User 16850768

    (@anonymized-16850768)

    Thank you for sharing your feedback. Please accept my sincerest apologies as I made a mistake in my first reply. If the advanced snippet is used and the X-Cache-Handler: wp (or X-Cache-Handler: php) response header is not present then it’s been implemented correctly.

    When checking your website I see the Cache Enabler HTML comment in your page source and the X-Cache-Handler response header is not present:

    <!-- Cache Enabler by KeyCDN @ 09.01.2020 07:06:38 (html) -->

    HTTP/2.0 200 OK
    date: Thu, 09 Jan 2020 17:35:47 GMT
    server: Apache/2
    x-content-type-options: nosniff
    last-modified: Thu, 09 Jan 2020 12:06:38 GMT
    etag: "383d4-59bb3d75f13a1-gzip"
    accept-ranges: bytes
    vary: Accept-Encoding,User-Agent
    content-encoding: gzip
    x-xss-protection: 1; mode=block
    x-permitted-cross-domain-policies: none
    x-dns-prefetch-control: off
    referrer-policy: no-referrer-when-downgrade
    content-length: 38234
    content-type: text/html
    X-Firefox-Spdy: h2

    This indicates that you’ve implemented the advanced configuration correctly.

    Thread Starter werdpres

    (@werdpres)

    thanks Cory

    i’m also curious about the results of gtmetrix which grades poorly regarding caching…

    PS: Leverage browser caching (75)
    YS: Add Expires headers (56)

    the missing expire headers bothers me most – i have ‘Cache Expiry’ set to 1 hr.

    Anonymous User 16850768

    (@anonymized-16850768)

    Those recommendations are unrelated to the Cache Enabler plugin. Cache Enabler is a lightweight page caching plugin. This means a static HTML page is generated, saved to the server disk, and then delivered to your visitors instead of having to generate that page on each request. Currently this plugin doesn’t add or modify the Cache-Control and Expires response headers.

    To improve those performance scores I’d recommend checking out this Fix Leverage Browser Caching Warning article.

    Thread Starter werdpres

    (@werdpres)

    thanks for the info Cory … i use what i think is an excellent WP plugin, ‘HTTP Headers’, which made it super easy to add the (not so) necessary headers

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘apache htaccess advanced cache setup’ is closed to new replies.