Two issues, img background and Leverage browser caching
-
When I enable optimise HTML the background image of my site disappears.
also, I checked google page seep and gtmetrix and says I should enable Leverage browser caching
I thought it was because I had turn off optimise html but I turned it off to check and still the same result
-
re. leverage browser caching; AO tries to tell apache to do so, but only for the autoptimized JS/ CSS files. if you’re not on apache you’re going to have to go for non-static delivery (last option on settings-screen)
re. background image; that’s weird. can I have your URL to have a look?
frank
I selected the non-static delivery and still the same
well, you’re “leverage browser caching”-warnings are actually all for images, which AO does not act on. you’ll need to add some stuff to your .htaccess to fix that (or use another plugin)
regarding background-image; can’t see any reason why html optimization would break that. i copy/paste the relevant html and the image remained visible after html optimization. could you ever-so briefly enable html opt. for me to see what is wrong? a screenhost + html source could also help.
frank
hmmm, too tired, going to grab some sleep, so let’s do a screenshot (you can upload to imgur.com) and html source (copy/paste it at pastebin.com) instead for me to look at when my brain recharged? 🙂
frank
you mean the warning is for all the images outside my wordpress folder??
ok, I have enabled the HTML option now… and I added the background via the Appearance/background on the control panel
well, don’t know about you but I do see the background even when HTML is optimized?
regarding images; even when inside the wordpress folder; AO does not handle images at all, so “leverage browwser caching” for those should be done with another solution.
frank
This is very odd.. I can’t see it even if I clear the cache or change browser… The background is like small mosaic .. you sure you can see it and not just the plain grey background colour?
I thought leverage browsing was for images too…
I thought leverage browsing was for images too…
“leverage browser caching” also applies to images, but Autoptimize does not act on images, so AO does not “leverage browser caching” for images 🙂
This is very odd.. I can’t see it even if I clear the cache or change browser… The background is like small mosaic .. you sure you can see it and not just the plain grey background colour?
yep, tested in 3 browsers (IE11, FF & Chrome), cfr. this screenshot from a webpagetest.org test I just ran.
Frank, I can’t see the background image on your screenshot…
here’s a screenshot of my page with the background visible http://imgur.com/kwCfteRalso I have circled in blue another issue when I select Optimize JavaScript Code, as you can see, both tabs are showing the content underneath each other, it should only show one tab content when selected
I tried to select and deselect all options on JavaScript Options, sometimes it works, sometimes it doesn’t…
I have the feeling there is aso some incompatibility with Zencache..ahhh, that background image, now it’s getting interesting as indeed AO seems to remove the opening body-tag in your case, which obviously is not OK.
Don’t think it’s Zencache, but might be. Could you disable it for a second? Do you have any other plugins that try to do HTML compression or that use the output buffer?
also I have circled in blue another issue when I select Optimize JavaScript Code, as you can see, both tabs are showing the content underneath each other, it should only show one tab content when selected
that’s classic JS troubleshooting as per the FAQ actually. adding
jquery.jsto your JS optimization exclusions should do the trick.frank
ok, I have disabled zencache and cleared the cache.
these are my activated plugins: Add Meta Tags, BackUpWordPress, BulletProof Security, Facebook Comments Plugin, Facebook Comments Plugin, WP Facebook Open Graph protocol, WP-PageNavibefore I was using wp-minify but since I installed AO I disabled it , I haven’t deleted it yet
what options should I use for the java? I have selected Force JavaScript in <head> and it does nothing
fyi: just tested custom background + zencache + autoptimize on my local development-environment and no problem there, so is very likely another plugin interfering somehow.
next step would be for you to disable (and re-enable) plugins one after the other to see which one is conflicting with AO HTML optimization.
frank
ok, I will test it later today… I gotta now… I’ll let you now the results
what options should I use for the java? I have selected Force JavaScript in <head> and it does nothing
well, as I wrote; adding
jquery.jsto your JS optimization exclusions should do the trick.ok, I disabled and re-enabled my plugins and the culprit is WP Facebook Open Graph protocol.
not only I lose the background , I also realised the responsive menu is gone as well with AO and WP Facebook Open Graph protocol are both activated,
I have deactivated WP Facebook Open Graph protocol for the time being…
The topic ‘Two issues, img background and Leverage browser caching’ is closed to new replies.