<script type="text/javascript">
(function() {
alert("hola1");
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js?onload=OnLoadCallback';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<body onload="function()">
You are using jquery before calling it, that's causing your issue, i'd rather use my script to load jquery and then perform deferred actions.Regards.
--To view this discussion on the web visit https://groups.google.com/d/msgid/pagespeed-insights-discuss/b33228ee-faa2-4aea-8a93-acc810d5b8d9%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pagespeed-insights-discuss/256d0331-6197-42da-8f28-7a99d4073c52%40googlegroups.com.
var dfLoadStatus = 0;var dfLoadFiles = [["blabla..."]];function downloadJSAtOnload() {if (!dfLoadFiles.length) return;var dfGroup = dfLoadFiles.shift();dfLoadStatus = 0;for (var i = 0; i < dfGroup.length; i++) {dfLoadStatus++;
var element = document.createElement('script');
element.src = dfGroup[i];element.onload = element.onreadystatechange = function () {if (!this.readyState || this.readyState === 'complete') {dfLoadStatus--;if (dfLoadStatus === 0) {if (dfGroup.length === 1) { //if jquery was loaded, then load other jsdownloadJSAtOnload();} else { //all is already loaded, perform deffered actionsperformDeferredActions();}}}};document.body.appendChild(element);}}
if (window.addEventListener) {window.addEventListener("load", downloadJSAtOnload, false);} else if (window.attachEvent) {window.attachEvent("onload", downloadJSAtOnload);} else {window.onload = downloadJSAtOnload;}
function performDeferredActions() {$.ajax({type: "GET",url: "http://js.js",dataType: "script",cache: true /* or false if you don't want to cache it*/});
}
--
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pagespeed-insights-discuss/bc51263e-9f94-4c9a-ad89-f13e124ccf77%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pagespeed-insights-discuss/70930388-3638-4237-b410-e86298afd401%40googlegroups.com.
Carlos,student but you'll have a great knowledge and talent for this.i'm wondering why in Blogger i can't make the deferred loading... i'll test this night the css utility that you've passed me and retest the deferred call with httpwatch to debug the call and see what it's happening. I'll keep you informed.Best regards,
2014-06-25 16:14 GMT+02:00 Carlos Lizaga Anadon <carlos...@gmail.com>:
Oh, i'm only a student, but thank you for the compliment.Keep me informed.Regards,Carlos Lizaga.
--
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-discuss+unsub...@googlegroups.com.
//<![CDATA[ (function() { var s=d ocument.createElement('SCRIPT'), s1=d ocument.getElementsByTagName('SCRIPT')[0]; s.type=' text/javascript'; s.async=t rue; s.src=' https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'; s1.parentNode.insertBefore(s, s1); })(); //]]> Again with no need of CDATA usage. Lets try this, go to Chrome, right click on any element and inspect, open console and paste this: var dfLoadStatus = 0; var dfLoadFiles = [ ["https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"], [ "//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js" ] ]; function downloadJSAtOnload() { if (!dfLoadFiles.length) return; var dfGroup = dfLoadFiles.shift(); dfLoadStatus = 0; for (var i = 0; i < dfGroup.length; i++) { dfLoadStatus++; var element = document.createElement('script'); element.src = dfGroup[i]; element.onload = element.onreadystatechange = function () { if (!this.readyState || this.readyState === 'complete') { dfLoadStatus--; if (dfLoadStatus === 0) { if (dfGroup.length === 1) { //if jquery was loaded, then load other js downloadJSAtOnload(); } else { //all is already loaded, perform deffered actions performDeferredActions(); } } } }; document.body.appendChild(element); } } if (window.addEventListener) { window.addEventListener("load", downloadJSAtOnload, false); } else if (window.attachEvent) { window.attachEvent("onload", downloadJSAtOnload); } else { window.onload = downloadJSAtOnload; } function performDeferredActions() { alert("llego a ejecutar deferred"); $.ajax({ cache: true, async: true, dataType: "script", url: 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js' }); } Press enter, and then write: downloadJSAtOnload(); And press enter again. And then to test if jQuery was loaded properly try this: $.fn.jquery; You should get a return with your jquery version by then. Also, I'd get the latest jquery version which is //ajax.googleapis.com/ajax/libs/jquerymobile/1.4.2/jquery.mobile.min.js Using no http/https will mean that it will automatically fit with your current protocol (if you use http it will load it from http, and if you use https it will load it from https to avoid https issues). |
I'll try this tomorrow adn i'll tell you... Thank you again.
Miguel.
Ok, but i'll send it to your gmail account because they are private. I'm on it.
Thank you Carlos
Please, use pastebin to give me your inline scripts so I can set it up.Regards.
--
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pagespeed-insights-discuss/1650a9f5-5f50-4254-9a9c-d1c648e82484%40googlegroups.com.