• Resolved knzzz

    (@knzzz)


    I’m getting “Clear-Site-Data header on ‘<URL>’: Unrecognized type: cache.” console errors. Also PageSpeed Insights is printing out “Serve static assets with an efficient cache policy”. This happens after turning on all cache settings (Page, object, browser database caches)

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

Viewing 1 replies (of 1 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @knzzz

    Thank you for reaching out and I am happy to assist you with this.
    The Clear-Site-Data header is not added by W3 Total Cache.
    The Clear-Site-Data header clears browsing data (cookies, storage, cache) associated with the requesting website. It allows web developers to have more control over the data stored by a client browser for their origins.
    Since W3 Total Cache does not add this header, this is added manually in the server config or .htaccess/nginx.conf
    It detects that the cache is enabled and as mentioned above, it tries to clear data on the client’s end.
    The problem with the console error is that the header is set:
    Clear-Site-Data: cache
    and should be:
    Clear-Site-Data: "cache"
    As for the Serve static assets with an efficient cache policy, please make sure that the Cache-control header and Expires header options are enabled in Performance>Browser Cache for HTML&XML, CSS&JS, Media&Other files.
    I would also recommend disabling Object Cache and Database Cache if caching to Disk, and if the database is the bottleneck of your websites performance, please check with your host and use Redis or Memcached PHP extension, so that you can use DB and Object Caching with one of the mentioned memory-based caching options.

    I hope this helps!

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Clear-Site-Data header on ”: Unrecognized type: cache.’ is closed to new replies.