Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: HTML 5 add file type with PH webserver? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
raven77
Groupie
Groupie
Avatar

Joined: January 02 2007
Location: United States
Online Status: Offline
Posts: 44
Posted: October 04 2009 at 13:04 | IP Logged Quote raven77

I am trying to make my PowerHome iPhone webapp cache files locally. I add this to my main .html file...

<html manifest="cache.manifest">

Then I create a cache.manifest file, but according to Apple dev files "It must be served with type text/cache-manifest."
And I can do this by adding this to the config file

AddType text/cache-manifest .manifest

How can I do this with the PowerHome webserver? I checked the .ini file and didn't see anything.
I found this in the help files "ph_setwebcontenttype" but I am not sure how to use it!
Can anyone give me a hand?
Another quick question...
I always made all my web files with .psp extensions thinking I had to for the controls to work. I recently changed it to .html and everything works fine?

What is the purpose of the .psp extension if it works as .html?
just wondering!
Thanks for any input!!!
Back to Top View raven77's Profile Search for other posts by raven77
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: October 05 2009 at 09:16 | IP Logged Quote TonyNo

Could be just security. Check your web settings in PH.

IIRC, HTML files are not secured with a login by default.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: October 06 2009 at 15:47 | IP Logged Quote dhoward

I'll answer the easier question first :)

PSP will be parsed in 3 different file types..PSP,.ASP, and .HTML. PSP and ASP both use the PSP security type in the Webserver configuration. HTML will use the security setting defined for HTM files. This allows you to have two different security levels for your PSP files. You could for example set .PSP extension files to allow everyone access and then setup your own internal security within the PSP file itself.

The PowerHome webserver has a limited number of supported content types and they are all hard-coded within the webserver. A future enhancement will allow for user defined content types but were not there yet. However, any PSP supported extension can override its default content type of text/html by calling the ph_setwebcontenttype. Not sure if your app requires a specific file extension (in this case .manifest) but if it doesnt, you could do something like:

<html manifest="cache.manifest.psp">

and then in the cache.manifest.psp file put:

<%ph_setwebcontenttype("text/cache-manifest")%>
....the actual contents of your cache.manifest file

Assuming the actual extension is not important and just the MIME type, then the above will work for you.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
raven77
Groupie
Groupie
Avatar

Joined: January 02 2007
Location: United States
Online Status: Offline
Posts: 44
Posted: October 10 2009 at 19:57 | IP Logged Quote raven77

Thanks for the input guys, but unfortunately it didn't work.
I guess it has to have the .manifest extension.
Thanks anyway! I guess I will wait for a powerhome update or either try to get it working through IIS.

Back to Top View raven77's Profile Search for other posts by raven77
 
raven77
Groupie
Groupie
Avatar

Joined: January 02 2007
Location: United States
Online Status: Offline
Posts: 44
Posted: July 07 2010 at 19:48 | IP Logged Quote raven77

Dave,
Any chance of this feature making it in to the next version?
I would love offline access to my iPhone webapp!
Thanks
Back to Top View raven77's Profile Search for other posts by raven77
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum