I have a wordpress site that intermittently displays incorrectly due to a bad css url being served to the client (by apache). I have tracked down the problem to the css file being somehow linked to with an incorrect link:
siteexample.com/wp-content/themes/twentyten/ce.bf1f3e76cdf43e6250526a554c555315.style,s.css
This file doesn't a开发者_JAVA百科ctually exist on the filesystem, which leads me to believe it is generated on the fly and served by apache through a possible tempfile. This functionality does indeed work on some of my other sites and I can click the link in question and load the css file (for those sites the theme is working correctly as well.
If I view the page source and click the bad link it gives me an error (In google chrome):
Error 321 (net::ERR_INVALID_CHUNKED_ENCODING): Unknown error.
Now noticing the "ce.bf1f3e"... on the beginning of the bad css url, the "ce" could be a prefix for "chunked encoding", but I am not aware of how this url is being generated in the first place. If it is on the apache side or on the wordpress side.
How can I turn off chunked encoding or force the css url to be given to the client as it exists on the filesystem as "style.css"?
I have found the issue. It appears wordpress has built in css caching that isn't resolving correctly. Regardless of the main problem, I have decided to disable css caching by using a separate wordpress plugin that appends a timestamp on the end of the css url and pulls the latest version from the filesystem every time. Css Cache Buster Wordpress Plugin
I will post any follow up information I find on wordpress's css caching, but until then it appears this plugin has solved my immediate problem of the css url being incorrect when the page is served to the client.
精彩评论