WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > PROGRAMMING LANGUAGES > Scripting and Server Side > [SOLVED] When is external JS actually called?

Reply
  Thread Tools Display Modes
Old 10th July 12, 06:21 PM   #1
BeccaT
WLC Member
 
Join Date: Jun 2012
Posts: 19
Default When is external JS actually called?

I'm getting ready to streamline a responsive website to reduce bandwidth load for handheld devices. I plan to depreciated a few items for 480px and under with one of them being the FlexSlider image slideshow. My question is: With the jquery.flexslider.js in the head of the page does this mean this additional 40Kb will automatically be loaded for all viewports or only those that call on it? If it does auto-load is there a proper way to also media-call it as needed?

http://streamlinemac.com/test29f2/index.html
BeccaT is offline   Reply With Quote
Old 10th July 12, 07:44 PM   #2
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
Default Re: When is external JS actually called?

Quote:
does this mean this additional 40Kb will automatically be loaded for all viewports
Yes it does.
chrishirst is offline   Reply With Quote
Old 11th July 12, 05:06 PM   #3
BeccaT
WLC Member
 
Join Date: Jun 2012
Posts: 19
Default Re: When is external JS actually called?

Thanks chrishirst.

Continued research supports your answer. Based on the options that look to be available I'm leaning towards simply mirroring the current site, remove some of the non mobile-friendly entities and publish a low-bandwidth version giving the visitor the choice. There does seem to be a handful of options for calling specific scripts based on viewport size or device type but these look to be inconsistent in determining which are which. Add to that the ever changing resolution for mobile devices along with the connectivity inconsistencies within device types and it seems optioning the visitor with high or low bandwidth versions is the way to go.

I also learned that simply placing display:none in a media query does not prevent site properties listed in the HTML mark-up from being downloaded (there are some options but they are just as spotty as mentioned above). This is another very good reason for two site versions.

Again, appreciate your reply!
BeccaT is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:22 PM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyright© 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.