are you using the default “static file” delivery of the Autoptimized files or did you deactivate that optioni chicop?
frank
Thread Starter
chicop
(@chicop)
Hi Frank,
Yes, I have the default enabled
https://d.pr/i/JLM6Nv
In that case the static file is served directly by the webserver and WordPress or Autoptimize are not in the picture. Could be an issue with webserver config or with a proxy between the browser and the webserver or even just browser cache (try clearing browser cache maybe)?
Technically: 304 means “not modified” and the webserver gives that reply if the request has a if-modified-since in the request header. if your browser sends if-modified-since and the webserver replies with 304, then the browser is supposed to have the older version in cache and use that. more info on https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since
hope this helps,
frank
Thread Starter
chicop
(@chicop)
This is a more detailed description:
The 1st request is a 200, then the loop starts and the server answer with 304 which is the expected behaviour. The problem is that the application keeps asking the server for the autoptimize file as you can see here.
The generated element on IE11 and Edge has an attribute that other browsers don’t have (data-loadcss). Is this the expected behaviour? Apart from the different engines, this is the only difference detected:
<link onload="this.onload=null;this.rel='stylesheet'" href="https://[OMITTED].pantheonsite.io/wp-content/uploads/autoptimize/css/autoptimize_b343e2a5a7f5cf1c9a206a99ae3d3a96.css" rel="stylesheet" media="all" as="style" data-loadcss="true">
Also, I noticed this issue on Github: here
It reports the same problem I have and I think that is the same polyfill that autoptimizes uses.
This error began when we disabled the JS process on the ‘Autoptimize’ plugin and added a hash to our new minified js files with our build process (webpack).
Thanks for the help
-
This reply was modified 7 years, 8 months ago by
chicop.
AO indeed also uses loadCSS and it appears to be the same issue at first sight, but the solution proposed and confirmed working is in there (the onload="this.onload=null;this.rel='stylesheet'").
but what surprises me is that data-loadcss="true"> part, as that is not added by Autoptimize. are you using any other plugin/ tool to do performance optimization?