• I have WP Fastest Cache installed on several sites usually without much of a problem. This specific site is having trouble’s that even other sites on the same CPanel server don’t have.

    So on the first hit the page is loaded correctly.
    Headers appears normal with correct content-type:

    HTTP/1.1 200 OK
    Date: Mon, 26 Aug 2019 21:08:24 GMT
    Server: Apache
    Link: <https://************/wp-json/>; rel="https://api.w.org/", <https://www.*****.com/?p=13>; rel=shortlink
    Keep-Alive: timeout=5, max=100
    Connection: Keep-Alive
    Content-Type: text/html; charset=UTF-8
    Content-Length: 26775

    On the second and any subsequent requests when it pulls from cache, the page downloads as an html file. This happens regardless of browser as long as you are NOT logged into the wordpress admin. Chrome debugger lists the content-type as ‘document’ but more in depth packet captures show that the server is returning ‘application/x-httpd-php5’ along with the cache related headers specified by the plugins .htaccess entries.

    HTTP/1.1 200 OK
    Date: Mon, 26 Aug 2019 21:05:52 GMT
    Server: Apache
    Vary: Cookie,User-Agent,Accept-Encoding
    Last-Modified: Mon, 26 Aug 2019 21:03:35 GMT
    Accept-Ranges: bytes
    Cache-Control: max-age=0, no-cache, no-store, must-revalidate
    Pragma: no-cache
    Expires: Mon, 29 Oct 1923 20:30:00 GMT
    Content-Length: 26840
    Keep-Alive: timeout=5, max=98
    Connection: Keep-Alive
    Content-Type: application/x-httpd-php5

    So far I don’t see any conflicts but just in case here is a list of plugins.

    +-----------------------------------+----------+-----------+---------+
    | name                              | status   | update    | version |
    +-----------------------------------+----------+-----------+---------+
    | admin-custom-login                | active   | none      | 2.9.5   |
    | advanced-custom-fields-pro        | active   | none      | 6.3.3.2 |
    | akismet                           | inactive | none      | 4.1.2   |
    | broken-link-checker               | active   | none      | 1.11.8  |
    | contact-form-7                    | active   | none      | 5.1.4   |
    | google-analytics-dashboard-for-wp | active   | none      | 5.3.9   |
    | google-sitemap-generator          | inactive | none      | 4.1.0   |
    | iwp-client                        | active   | none      | 1.9.4.1 |
    | query-strings-remover             | inactive | none      | 1.1     |
    | really-simple-captcha             | active   | none      | 2.0.2   |
    | scripts-to-footerphp              | inactive | none      | 0.6.3   |
    | simple-custom-post-order          | active   | none      | 2.4.4   |
    | sucuri-scanner                    | inactive | none      | 1.8.21  |
    | types                             | active   | available | 2.2.2   |
    | wordfence                         | active   | none      | 7.4.0   |
    | wp-fastest-cache                  | active   | none      | 0.8.9.7 |
    | wp-script-optimizer               | inactive | none      | 0.4.5   |
    | wordpress-seo                     | active   | none      | 11.9    |
    | mu-iwp-client                     | must-use | none      |         |
    +-----------------------------------+----------+-----------+---------+
Viewing 1 replies (of 1 total)
  • Plugin Author Emre Vona

    (@emrevona)

    there must occur a problem in htaccess. Can you deactivate wpfc and clear htaccess and activate wpfc again please?

Viewing 1 replies (of 1 total)

The topic ‘Content type changes when cached, html downloads as file’ is closed to new replies.