Closed GoogleCodeExporter closed 8 years ago
Sorry, it is not clear what is the problem here. Could you please provide exact
piece of page source before and after a compression?
Original comment by serg472@gmail.com
on 9 Jun 2010 at 5:49
Google says stick this in your page
<!-- Google Website Optimizer Control Script -->
<script>
function utmx_section(){}function utmx(){}
(function(){var k='1466590057',d=document,l=d.location,c=d.cookie;function f(n){
if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.indexOf(';',i);return
c.substring(i+n.
length+1,j<0?c.length:j)}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
d.write('<sc'+'ript src="'+
'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
+'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime=
'
+new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
'" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
</script>
<!-- End of Google Website Optimizer Control Script -->
That code is in a JSP that is being compressed using htmlcompressor taglib
When google loads the page it complains with something like
expected <!-- Google Website Optimizer Control Script -->
<script>
function utmx_section(){}function utmx(){}
(function(){var k='1466590057',d=document .....
found <!-- Google Website Optimizer Control Script -->
<script>
function utmx_section(){}function utmx(){}
(function(){var a='1466590057',b=document
Original comment by jeff%kre...@gtempaccount.com
on 17 Jun 2010 at 2:58
Do you have inline javascript compression on? If so you probably need to
disable it for that piece of code as Google seems like doesn't like its
javascript being recompressed.
Original comment by serg472@gmail.com
on 17 Jun 2010 at 4:19
Are you saying there is a way I can prevent the javascript from being
compressed for this one section of my JSP and still compress any other
javascript found in the JSP?
Original comment by jeff%kre...@gtempaccount.com
on 17 Jun 2010 at 4:22
It compresses only code that you wrapped into compressor tags. So you can do
something like this:
<compress:html compressJavaScript="true">
<html>
...regular code that will be compressed....
</compress:html>
<!-- Google Website Optimizer Control Script -->
<script>
function utmx_section(){}function utmx(){}
...
</script>
<compress:html compressJavaScript="true">
...rest of the page...
</html>
</compress:html>
Original comment by serg472@gmail.com
on 18 Jun 2010 at 1:38
could you please add a feature for servlet filter?
sometimes i want to compress javascript or css by any request.
I can join in to the develop list.i have write the code already based on your
project.
Original comment by cmings.c...@gmail.com
on 19 Nov 2010 at 8:58
by the way,i do know how to apllication a member for development.
Original comment by cmings.c...@gmail.com
on 19 Nov 2010 at 8:59
@cmings.chen If you could zip your code and send it to serg472@gmail.com I can
take a look. Thanks.
Original comment by serg472@gmail.com
on 19 Nov 2010 at 4:44
Original comment by serg472@gmail.com
on 26 Mar 2011 at 8:15
Original issue reported on code.google.com by
jeff%kre...@gtempaccount.com
on 7 Jun 2010 at 10:08