User(s) browsing this thread: 1 Guest(s)
|
Dynamic Javascript Loading
|
|
11-01-2009, 08:44 PM
|
|||
|
|||
|
Dynamic Javascript Loading
Dynamic Javascript Loading has been mentioned in the new firmware threads, but I though it needs a thread here for a wider audience...
Presumably the idea is to delay parsing/processing of javascript until it's actually needed. Thus decreasing the initial page load time. Has anyone got this working? (I'm guessing yes since one particular jukebox requires latest firmware? ) The wiki page needs an update. http://www.networkedmediatank.com/wiki/i...ipt_on_NMT Previous chatter : http://www.networkedmediatank.com/showth...#pid101647 Oversight: Jukebox | FeedTime: Automatic nzbs |
|||
|
11-01-2009, 08:47 PM
|
|||
|
|||
|
RE: Dynamic Javascript Loading
gfb and i have been discussing this a bit.
He's much further along in the process then i am. I'm just begining to understand its capabilities. He's been very patient with me
Pannasonic Plasma 50" -->HK254-->Emotiva xpa-5 & upa-2 A100 w/ 500gb HDD, A200 w/ mn100, c200 w/ 2.5" 250gb Calm 2.1, YAMJ - Redefined 1.8a skin, Music Jukebox 8 WHS ex490 w/ 2.5tb's |
|||
|
11-02-2009, 02:59 PM
(This post was last modified: 11-02-2009 03:34 PM by gfb107.)
|
|||
|
|||
|
RE: Dynamic Javascript Loading
I've got it working, but I have much more to do before I have a skin ready for release.
The point is not to delay the loading/parsing of javascript. The idea is to pass information between the html pages to keep track of the context in which the user is browsing, and use that information to dynamically load the javascript information about that context in order to provide enhanced functionality. And do it in a way that maximizes performance by minimizing the amount of data loaded for each page. Here's a simple example. Say I'm browsing the "Genres : Adventure" index (Genres_Adventure_1.html"). I might click into the details for one of these movies, then use the next movie link expecting to see the next Adventure movie, but the way it works now I end up seeing the next movie in my entire collection instead. The detail page isn't aware of the index the user is browsing. And there's no way to know ahead of time which index the user is browsing, because it is dynamic based on the path the user took to reach that page. With dynamic javascript loading, we can pass as parameters in the URL the name of the index being browsed and the current movie number within that index. The detail index can then parse those parameters into javascript variables and determine that it should load the javascript file for the "Genres : Adventure" index, which might contain an array listing the names of the detail files for the movies in that index. The javascript code can also compute the offset of the next/previous movies (by adding/subtracting 1, with boundary checking) so it can set the next/previous links the correct detail file, but also passing the current index and adjusted movie number in the URL. This way the user can browse to the next movie repeatedly, always staying within the context on the current index. Of course this could have been done without dynamic loading, but would have required loading ALL the indexes rather than just the current one. iSkin: YAMJ for iOS, Android, Chrome or Safari. Supports Series 1-4 (Series 2-4 Flash compatible and zero-config multi-shares)
|
|||
|
11-02-2009, 04:27 PM
(This post was last modified: 11-02-2009 04:27 PM by lordy.)
|
|||
|
|||
|
RE: Dynamic Javascript Loading
Thanks, perhaps my language was not clear. (being ex compiler writer I tend to see things from that point of view
), but I gather it is simply to only load javascript that is required at the time. Whether that js contains more code or data etc. we dont want to waste time having the JS interpreter parse it unless the user is actually about to use it. On-Demand java modules if you like?
Oversight: Jukebox | FeedTime: Automatic nzbs |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| NFO Manager v1.0.4 Beta Released Nov 11th - With Dynamic JukeBox | vaidyasr | 76 | 31,423 |
01-12-2011 02:12 PM Last Post: mfsav2 |
|
| New to NMT Javascript - HELP! | GibParadox | 16 | 3,739 |
07-02-2010 08:12 PM Last Post: excal |
|
| No Video output after loading | beanyman1000 | 3 | 1,318 |
04-12-2010 06:56 PM Last Post: spawn |
|
| a-110 not loading up when lan cable is plugged in. | miikkax | 0 | 945 |
03-17-2010 07:11 PM Last Post: miikkax |
|
| taimador - standalone dynamic jukebox | rony | 11 | 4,799 |
02-28-2010 07:00 PM Last Post: rony |
|
| NTFS 3g not loading. What am i doing wrong? | Gemni69 | 9 | 2,933 |
12-06-2009 05:11 AM Last Post: lundman |
|
| A110 Wont Fire Up After Loading Symbol | m2dmhot | 0 | 853 |
11-22-2009 06:45 AM Last Post: m2dmhot |
|
| No TV signal after "Loading...." | kbca | 1 | 989 |
11-16-2009 03:57 PM Last Post: daniel_owen_uk |
|
| Stream Media File using JavaScript | MikeMcr | 0 | 1,116 |
11-07-2009 01:16 PM Last Post: MikeMcr |
|
| slow loading | oxonian | 5 | 1,793 |
11-02-2009 05:14 PM Last Post: laureck |
|

Twitter
Facebook
NMT Wiki
Search
Member List
Help
A-400 [13 May 2013]




![[+]](images/collapse_collapsed.gif)

![[Image: btn_donate_LG.gif]](https://www.paypal.com/en_GB/i/btn/btn_donate_LG.gif)
