wildmice
Forum Replies Created
-
Forum: Plugins
In reply to: [Autoptimize] HTML compression breaks CDATAsWell… i went to put nooptimize tags around that JS and realized it is already being excluded by AO without my doing anything. Isn’t all inline JS supposed to be combined too, unless it’s inside nooptimize tags?
Forum: Plugins
In reply to: [Autoptimize] HTML compression breaks CDATAsDid not realize that nooptimize would work for JS as well…
That is a nice (and smart) solution, as long as you are not relying on the doctype to determine whether it’s xhtml, because HTML5 can be either xhtml or html4-style html.
Practically speaking, this is really only a concern for purists, and just something i passed along because i noticed it, not because it broke anything functional. Although i do use XHTML everywhere…
Forum: Plugins
In reply to: [Autoptimize] HTML compression breaks CDATAsFor JS code inside a script tag to be valid XML/XHTML, we need the CDATA there.
Forum: Plugins
In reply to: [Autoptimize] HTML compression breaks CDATAsI made that change, but it looks like the fix does not work. The CDATA and comments around it get completely removed. …Or maybe that was what you intended?
Here is the code before i enable HTML compression :
<script>
/*<![CDATA[*/
(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’);
ga(‘create’, ‘UA-65746333-1’, ‘auto’);
ga(‘send’, ‘pageview’);
/*]]>*/
</script>And here is what it looks like with HTML compression turned on :
<script>(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’);
ga(‘create’, ‘UA-65746333-1’, ‘auto’);
ga(‘send’, ‘pageview’);</script>Forum: Plugins
In reply to: [Autoptimize] HTML compression breaks CDATAsApologies, there were two things i found today that were not handling this case, and it was the other one that was making the entire JS code disappear. Sorry for my lapse…
The way it’s posted above is correct, where “…” is the JS code.
Forum: Plugins
In reply to: [Autoptimize] HTML compression breaks CDATAsYes, it would be better to not lose the JS code. I guess people could live without the xHTML compliance, although it would be nice to retain the CDATA too. However, i can imagine the complexity of parsing something like that ??
Forum: Plugins
In reply to: [Autoptimize] AO conflicts with AdRotateHi again Frank ~
I’ve been thinking about your statement above that AO cannot optimizae all the JS all the time. While on the surface this makes sense, for me this approach doesn’t work. Here’s why:
I did indeed exclude the AdRotate files, including jquery, and the site runs fine, compressing whatever other JS files are there. But what happens after i turn this site over to the client and they decide one day to add a plugin that causes problems with AO? It’s unreasonable to expect that they will know what the problem is, and would basically be setting a trap for the unwary novice site admin (i.e. typical client).
For me the solution would be to have an option where i could instead say which JS files are *included*, so that when someone adds something new there won’t be the risk that AO may break it. To have AO on auto-pilot, optimizing everything, when as you say it *cannot* optimize everything… that’s the problem.
Personally i am ok with only the excluded files option, but as a developer i cannot turn anything over to a client like that, which means that effectively my use of AO is very limited. That is a pity, because it plays a very important role in performance optimization and i really want to use it in production.
– shanna
Forum: Plugins
In reply to: [Autoptimize] AO conflicts with AdRotateYeh, i understand. One of my options is to use a different ad rotator (if i can find one). I think it’s a reasonable guess that AdRotate has some JS that is a bit non-standard and perhaps it gets broken when compressed with the package you are using. There wouldn’t likely be much you could do about that.
Forum: Plugins
In reply to: [Autoptimize] AO conflicts with AdRotateWell for me that would kind of defeat the purpose. I really don’t want to load JS in the head for performance reasons. That’s what AO is all abou – performance.
What i’m trying to do is tweak a performance rating that is already at 95% google page rank / 87% y slow, because AO combining files brings the y slow rating up by about 5%.
So at a certain point i would lose more than i’d gain with AO.
Forum: Plugins
In reply to: [Autoptimize] AO conflicts with AdRotateYes, it works if i exclude the following :
jquery.js, jquery-migrate.min.js, jquery.adrotate.clicktracker.js
Since AdRotate uses jquery, i have to exclude that too, and doing so makes it hardly worthwhile use AO at all for JS.
Forum: Plugins
In reply to: [Autoptimize] AO conflicts with AdRotateOops, i forgot to say that this only happens when AO javascript options are enabled.
Forum: Plugins
In reply to: [Autoptimize] Conflict with FancyboxThis fix also resolves my problem with a broken back-to-top button.
Forum: Plugins
In reply to: [Autoptimize] Conflict with FancyboxI can confirm that making your recommended change to the yui css compressor php code does indeed fix the problem!
Forum: Plugins
In reply to: [Autoptimize] Conflict with FancyboxVery nice catch Frank! Thank you ??
Forum: Plugins
In reply to: [Autoptimize] UTF-8 problemsYes, it looks like you are right. I put Autoptimize on my own site at wildmice.ca, where i have some Chinese pages. I switched the font to a Chinese font. Everything seems to work.
When i inspect it through the browser tools, i see the Chinese font names correctly, like this :
body {
font-size: 1em !important;
font-family: 微軟正黑體,”Microsoft JhengHei”,华文细黑,STXihei,宋体,SimSun,新宋体,NSimSun,PMingLiU,”Arial Unicode MS”,”DejaVu Sans”,Tahoma,sans-serif !important;
}On this site too, the FancyBox sprite is broken for the lightbox closer X. However, the back to top button is not broken like it is with the theme that i sent you, so looks like that one is on my side to fix.