Custom Content Plugin

Are you having problems with using or developing a plugin? Let me know here.
agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: Custom Content Plugin

Post by agw » Mon Jul 14, 2014 12:42 am

Yes you probably could but it would need to be done after the page (and the paging system) has initialised, so you would still need to wait for Google Maps to load.

However, you can disable Google Maps entirely by starting in offline mode with the query string "notOnline=1". For example, if your VRS address is http://192.168.0.100/VirtualRadar/mobile.html then this would start it without loading Google Maps:

http://192.168.0.100/VirtualRadar/mobil ... otOnline=1

watsonm
Posts: 26
Joined: Sun Jun 29, 2014 12:19 pm

Re: Custom Content Plugin

Post by watsonm » Tue Jul 15, 2014 10:45 am

Andrew,

Many thanks for that. It unfortunately helps to prove that loading the map is not the issue!! :-(

If I launch that url on my mobile using the phone network, I get the IP address in the url address bar . the status bar then goes up to about 60%.
The url address bar then changes to "VirtualRadar"
The status bar then stays at 60% for about thirty seconds .
Then moves to about 80% and I get the alert that I have coded into the CustomGlobalOptions
Clearing that gets me to the map page which correctly says it is off line.

If I hook my phone into my local network the 30 second delay drops to 4 or 5 seconds before the alert pops up.

So I guess I am stumped as a lump of data is pulled in... :-(

Thanks anyway for the ?notOnline=1 option.

Mike

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: Custom Content Plugin

Post by agw » Sun Jul 20, 2014 1:10 pm

Sorry for the delay in replying.

There is a big lump of JavaScript that will be loaded in every time you load the site. The site's JavaScript is made up of several files, to improve download speed these are merged together into a single file. That file gets a different file name every time you view the page, which means the browser can't cache it.

You could try turning that feature off so that the files are downloaded separately and are more amenable to caching by the browser. The option is in Tools | Options | Web Site | Enable Bundling, set that to No. It's not a very good solution though, it would rely on the cache not getting cleared.

Aside from the JavaScript and the obvious things like image files (which, IIRC, are flagged as cacheable) the only other big thing getting downloaded is the aircraft list itself. You could try bumping up the delay between refreshes via the site's options to ease that a bit. However I don't think the first fetch is made until towards the end of the initialisation of the page, I'm not sure that it would account for the 30 second download time. I think the basic problem is that there's just a lot of JavaScript on the site. There's probably some stuff that I can cut out if notOnline is set, I'll look into doing that.

watsonm
Posts: 26
Joined: Sun Jun 29, 2014 12:19 pm

Re: Custom Content Plugin

Post by watsonm » Sun Jul 20, 2014 5:43 pm

Andrew,

Thanks for that. I didn't expect you to reply and assumed I would have to make do! Will give it a try and let you know.

Post Reply