What I want to do is displaying a website (a Portal one) within Worklight. So I'm hardcoding the URL in the mainFile tag:
<mainFile>http://example.com/page.html</mainFile>
Now I need to download the resources from this page (JS and CSS files), store them locally and replace the absolute URLs of the page with WorkLight URLs in order to speed up the page loading. How could I do this?