WebP and CDN
-
I use CDN. So i’ve shitched on Alternative WebP Rewriting. And after this my site smashes (styles and all the elements)
-
The strange thing, because styles are smashed only for non logged in users.
Can you please provide a link to your site also (and I assume you found load_webp.js)?
Only for non-logged in users? Sounds like perhaps the minification is mucking with a script. Either way, would be nice to have a link to your site, so I can browse the source.
I’ve disabled minification at all for all users (for testing purposes).
Here is the site http://www.expedition.pmSo for now there is also CSS mess for guests and OK for administrator. (there are no checked options different for administrator at W3TC).
found one thing: when I toggle OFF “Page Cache” in W3TC than also administrator gets smashed CSS.
Can you turn ON Alt WebP Rewriting, and then do a pastebin of the page source for a non-logged in user? Also assuming that in Firefox everything looks fine, but it is smashed in Chrome, so we want the pastebin to be the “smashed” version.
Firefox also has troubles π
Here is source: https://www.dropbox.com/s/8461t7m9aagmotv/view-source_www.expedition.pm.html?dl=0And this is source when ADMIN logged in:
https://www.dropbox.com/s/1xzqywwn1ybihoj/ADMIN-LOGGED-INview-source_www.expedition.pm.html?dl=0I’ve tries to disable all cache except CDN, and the situation is the same for guest and admin – smashed CSS
One more test π
Disabled CDN and inserted code to htaccess.
Result:
1. No webp images on site (jpeg and png used)
2. in plugin setting there is red figure with white PNG text. What could it mean? I expected to see white WEBP text, right?UPDATE: works. was my mistake in htaccess.
It’s lest last issue to make it work with CDN πUPDATE2: works, i mean there is white WEBP text in green figure. But on site webp is NOT used.
It can be difficult to tell if webp images are actually being served via the .htaccess mode, because they are swapped out transparently when the image is requested. So that means you won’t see the image urls change, but if you download an image and save it from Chrome, then try to view it on your computer, you should get an error (as far as I know there isn’t an OS that supports WebP natively yet).
If you have access to your access log for the server/website, you may be able to see the redirected requests there as well.
OK. Let’s forget about htaccess and follow topic.
What actually Advanced WebP rewriting do? Because for now I know that Cloudfront has ability to work with needed headers for webp:
http://friism.com/webp-content-negotiation-cloudfrontBecause for now when I switch it on my site hangs (i’ve had to rename plugin in order to disable it)
I’ve found how to fix plugin. now lets find how to show webp images on site.
I use Amazon CDN and now they support Accept headers.
For example, if you will check next command, if will return webp content-type.
curl -D - -H "Accept: image/webp" http://cdn1.expedition.pm/wp-content/uploads/2015/06/KM_APP_ICON_1024x1024.jpg -o /dev/nullNow, this means that I can use webp images with CDN even without Advanced WebP rewriting, right? and the only issue left it’s how to make your load_webp.JS to handle img src.
Take a look at http://www.expedition.pm/
There is your load_webp.js script which is in combined include_footer.js but it doesn’t replace jpg/png to webpHow to make images to use webp?
Solved situation. Just for information, now even with cdn you don’t need Advanced WebP rewriting. π
The topic ‘WebP and CDN’ is closed to new replies.