0

Is it possible to load a html file which resides in location outside www folder.

Case A: Let us consider www folder contains two files i.e. 1. index.html 2. profile.html Here we can access the profile.html by an anchor tag <a href="profile.html">Profile</a> within index.html

Case B: Here our www folder contains one file i.e. - index.html and the profile.html resides in a location outside www folder, as we would be downloading this profile.html file from server to our phone, let us say profile.html resides on our SD Card. So how can we access or load profile.html from index.html in Case B?

  • Is this possible, accessing file outside www folder?
  • Or Is it possible to download file from server and directly place it within www folder?

I am very new to this, and I believe somebody could share insight over this topic.

Pseudocode
  • 91
  • 2
  • 8

1 Answers1

1

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

One way to do what you want is to create a folder (let's call it sd_www) into the SD Card and move the content of your www folder to this sd_www. And instead of loading the index.html from the www folder, you'll load index.html from sd_www folder.

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

josemando
  • 573
  • 2
  • 9
  • Thats a new way to check out.I really have a doubt,is it possible to load the www folder from the server side,so that we can get updates for the file within this folder.If so ,will it be possible to access to native features. – Nassif Jun 13 '13 at 04:23