:) I totally understand the fact that for you it is not a problem. 738 bytes is definitely not a problem. But since the <head> is never reloaded if you're using slides, you can't only load the iUI.js and, only when maps.php is loading, download the maps.js.
Remi Le 4 déc. 2009 à 00:20, skip a écrit : > I guess I don't understand your app Remi. I am almost certain you > aren't following what I am saying either. I don't suggest the Google > Maps javascript should be downloaded and parsed at the <head> of the > document. Our code would not do that. If your "Maps" javascript is > included in a "Maps" page fragment it would be downloaded, parsed and > executed at the time the "Maps" page loaded. If you mean that you > want to control the time of execution according to user action in the > middle of the page - we use a separate technique to do this. We have > customized the various forms of the "Submit" event to enable special > form processing but the original poster did not ask about that. > > Unnecessary code download is always everybody's problem. It's 738 > bytes including comments ( wouldn't be any bigger for "Google Maps") , > it's used all the time and we just don't think it is unnecessary. > > Cheers, > Skip > > > > On Dec 4, 9:25 am, Remi Grumeau <[email protected]> wrote: >> If bandwidth and unnecessary code download is not your problem, then this is >> ok for you / your application. >> >> But it's not for me. The Google Maps javascript should only be downloaded >> and parsed by the browser only if and when i decide to. >> >> Le 3 déc. 2009 à 23:10, skip a écrit : >> >> >> >>> I'm not sure I follow the problem Remi. >> >>> If you are suggesting that it is possible to jump into the middle of >>> the app without loading the surrounding framework including iui.js, >>> iui.css etc then that would trash the whole app. >> >>> If you are suggesting the path to the custom.js file might be obscure >>> then it can be made as "fully qualified" as iui.js itself - whatever >>> that is. >> >>> If you are suggesting there is wasted bandwidth and unnecessary >>> downloaded code I can only say that in our case the "execute >>> javascript element" code is pretty short and is executed on a very >>> frequent basis. The app is entirely internal to our site so it is >>> only accessed by wi-fi at present and bandwidth is the least of our >>> problems. >> >>> Don't forget the end-user is not downloading the entire functional >>> javascript at the <head> of the application - he is just downloading >>> the little snippet that parses the fragment, extracts the eventual >>> javascript for the new page, and executes it. The page specific js is >>> downloaded with the page to which it applies and is not transmitted if >>> it is not needed. >> >>> In any case I am just reporting what we actually do in a production >>> application and so far it has not produced any grief. If anybody else >>> finds it useful - good for them. >> >>> Skip >> >>> On Dec 4, 8:30 am, Remi Grumeau <[email protected]> wrote: >>>>> Now in the <head> element of the first HTML page of your iUI project >>>>> add the following line as the last js declaration: >> >>>>> <script type=\"application/javascript\" src=\"myproject.js\"></script> >> >>>> Which is actually the whole point … i'd rather say "issue". >>>> Let's imagine i have a webapp with a products list with bunch of JS, a >>>> store locator using Google Maps, … and GA for analytics. >>>> A visitor which is not using the Map section will download the whole Maps >>>> Javascript for nothing. >> >>>> In this example case, that's not too bad … but for a biggest website / >>>> webapp, this could be a real first load timing issue. >>>> Am i wrong ? >>>> The only solution then would be to use a non-sliding target _blank link ? >> >>>> Remi >> >>>> smime.p7s >>>> 2KViewDownload >> >>> -- >> >>> You received this message because you are subscribed to the Google Groups >>> "iPhoneWebDev" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group >>> athttp://groups.google.com/group/iphonewebdev?hl=en. >> >> Remi Grumeau >> (+33) 663 687 206http://www.remi-grumeau.com >> >> smime.p7s >> 2KViewDownload > > -- > > You received this message because you are subscribed to the Google Groups > "iPhoneWebDev" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/iphonewebdev?hl=en. > > Remi Grumeau (+33) 663 687 206 http://www.remi-grumeau.com
smime.p7s
Description: S/MIME cryptographic signature
