Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Determine all resource urls during a page load

$
0
0

I'm new to titanium and I'm using a webview in order to load a webpage.

My code to do that so far looks like this:

$.webview.setUrl('http://m.example.com');
$.webview.addEventListener('load', function(){
    Titanium.API.log('loading: ' + $.webview.getUrl());
});
$.index.open();
When starting this app, I get only get one address as an output on the console namely:
[INFO] :   loading: http://m.example.com/#Home
However, i checked in Google chrome that this page loads several other resources like images, css, js files etc. But none of those urls are displayed in the console.

So what I want is to get the url of the resource currently being loaded. Something like this:

[INFO] :   loading: http://m.example.com/#Home
[INFO] :   logging: http://m.example.com/js/min.js 
[INFO] :   logging: http://m.example.com/css/queries.css
[INFO] :   logging: http://m.example.com/js/jquery.js
[INFO] :   logging: http://m.example.com/img/alarmclock.png
and so on.

How do I do that?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>