Issue
I'm developing a web application, which the pages are completely rendered from server-side, And application loads the page with a UIWebView
...
(The Url of that page is something like this: http://mydomain.com/application/
)
Is there any way to load image/js/css/webfont files locally instead of downloading them in WebView (iOS/Android)?
*If it was PC instead of iOS/Android, I think I may use something like this in server-side rendered page:
<script src="file:///C:/Program%20Files/MyApp/Data/script.js"></script>
or
<img src="file:///C:/Program%20Files/MyApp/Data/welcome.png" />
(I think, but I'm not sure)
But how to do something like this in Mobile app ( iOS UIWebView / Android WebView )?
Solution
Use a URI as the src in your html
"android.resource://[package]/[res type]/[res name]"
<script src="android.resource://com.example.sample/raw/js_script">
Answered By - tsmith
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.