You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
It would be good, once we have a real JS parser, to be able to optimize images
loaded from JS. Here's an example:
function fname(offset){
if(offset!=0){
timeout =1000;
$('#thisid').css('width:830px;height:167px');
}
jQuery.get("/ajax/some.php", { o: offset, l: limit,p:sdd},function(data){
if(data==''){
$(".editor").hide();
return;
}
}
update(offset);var sssleft = new Image();sssleft.src="http://cdn.doamin.com/img/name.png";
function show(){
$('.anyClass').remove();
$('.prev').remove();
$('.next').remove();
$('#thisid').html(somehtml);
jCaruselliteStart();
};
In other words, look for the pattern:
var X=new Image();
X.src= STATIC_STRING;
the STATIC_STRING could be parsed as a URL and swapped for an
optimized/cache-extended version, or possibly inlined with a data URL.
Original issue reported on code.google.com by jmara...@google.com on 15 Nov 2012 at 1:28