How do I load an html file that is outside of the www folder in Phonegap?

Is it possible to download an html file that is in a folder outside of www.

Case A : Consider a www folder containing two files, i.e. 1. index.html  2. profile.html where we can get access to a profile .html using tethered tag in index.html file <a href="profile.html">Profile</a>

Case Bed and . Here our www folder contains one ie file - index.html and profile.html is in a folder outside www as we will be downloading this profile.html file from the server to our phone, say profile.html is in our SD card ... So how can we access or load profile.html from index.html to Case B?

  • Is it possible to access the file outside the www folder?
  • Or is it possible to download the file from the server and put it directly in the www folder?

I am very new to this and I believe someone can share an understanding of this topic.

0


source to share


1 answer


The www folder is placed with the application resources and cannot be changed.

One way to do what you want is to create a folder (call sd_www on it) on your SD card and move the contents of your www folder to that sd_www. And instead of loading index.html from the www folder, you will be loading index.html from the sd_www folder.



This way, every time you download a new file from the server, you can access it from your index.html

+1


source







All Articles