Alpha DevCon 2018
Results 1 to 10 of 10

Thread: html static cache example

  1. #1
    Member Tbrondolo's Avatar
    Real Name
    Tom Brondolo
    Join Date
    Mar 2006
    Location
    New York,NY
    Posts
    434

    Default html static cache example

    Hi

    I have been trying to recreate the HTML Static cache example in the release notes. Attached a simple UX I created.

    The UX runs but the app cache events don't fire.

    Also, it's confusing to me how the server knows to process callbacks since the page is marked html and not a5w.

    If anyone has a working example of this could you please share.

    Thanks,
    Tom
    Attached Files Attached Files

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,669

    Default Re: html static cache example

    Do you mean this... "Creating Offline HTML5 Applications using the Application Cache" from these release notes... http://aadocuments.s3.amazonaws.com/...easeNotes.Html

    You've included the UX and HTML files... but not all the rest of the created files.

    I've taken your test_static_cache UX and re-created all the required files per the videos. Then I published everything and ran the created StaticHTMLPage_test_static_cache.html page. I turned off the server-side alert you added since it was interfering with seeing the file counts displayed while loading.

    It all works as set out in the videos... no issues. Ajax Callbacks work, the cache works as expected.

    Your UX is rendered, in full, inside the HTML page. Normally, the UX is embedded into the a5w page... and so renders while loading.

  3. #3
    Member Tbrondolo's Avatar
    Real Name
    Tom Brondolo
    Join Date
    Mar 2006
    Location
    New York,NY
    Posts
    434

    Default Re: html static cache example

    Hi David

    Thanks for the response. I believe the issue I'm having is related to the location of the files. After I save the component it creates the html file and manifest. When I publish this to local host open with MS edge I get "Error Cache was not loaded". The only files I see are the HTML file and the manifest file. If I look in the manifest file it's a list of assets it needs for the page. When you say I didn't provide the rest of the created files which ones are you referring to. I only see the html page, the original component and the manifest file.

    Thanks
    Tom

  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,669

    Default Re: html static cache example

    Inside the staticHTMLFileset folder there are the a5Images, css, and javascript folders.

    Best thing to do is quickly create a new Alpha project in a new folder and then move your UX component into that project. Then open and save that UX... and all the required files will be created.
    Basically this is why you perform a publish all... to ensure you get everything. Once you know what's where then you can publish individually.

  5. #5
    Member Tbrondolo's Avatar
    Real Name
    Tom Brondolo
    Join Date
    Mar 2006
    Location
    New York,NY
    Posts
    434

    Default Re: html static cache example

    Ok putting the test component into a new project worked.

    Now I just have to figure out why...
    Thanks
    Tom

  6. #6
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,669

    Default Re: html static cache example

    Did you "Publish All" from your original project?

  7. #7
    Member Tbrondolo's Avatar
    Real Name
    Tom Brondolo
    Join Date
    Mar 2006
    Location
    New York,NY
    Posts
    434

    Default Re: html static cache example

    So it works on a new project with No Security, but once I enable security I start to see issues. If I run check security on the publish page it tells me the HTML pages are denied, but they are all checked "always allowed" and I have the HTML file type allowed along with the *.appmanifest in allowed file types. This was probably my earlier problem when I was testing in a secured database. Can you enable security in your test workspace, see if you get the same issue.

  8. #8
    Member Tbrondolo's Avatar
    Real Name
    Tom Brondolo
    Join Date
    Mar 2006
    Location
    New York,NY
    Posts
    434

    Default Re: html static cache example

    Ok so more progress. I had to enable folder security on each of the folders under the staticHTMLfileset.

    What is strange is that while it's working I am still getting errors on check security for the main html page when I publish.

  9. #9
    Member
    Real Name
    Jonathan Freestone
    Join Date
    Apr 2017
    Location
    West Sussex UK
    Posts
    23

    Default Re: html static cache example

    Well I can't get the static Cache to work on IIS if I have security enabled. Works without security, but with it the web.config does not allow access to the static html page.

    I have tried setting "all files allowed" on every folder within the staticHtmlCache but that doesn't fix it either, plus it is quite tedious doing all those nested folders!

    has anyone got the static cache working on IIS with security?

  10. #10
    Member
    Real Name
    Jonathan Freestone
    Join Date
    Apr 2017
    Location
    West Sussex UK
    Posts
    23

    Default Re: html static cache example

    okay this is what got staticCache and app.manifest files working for me on IIS with security enabled. This would also apply to the AlphaLaunch manifest files!
    • Web Projects Control Panel
    • Open Web Security
    • Open Page Security
    • Open File Types Always Allowed
    • Add *.html and app.manifest (plus the file types created for Alpha Launch if you use it)


    Why that isnt in the documentation, or just set automatically I dont know. Thats quite a few man hours lost right there!

Similar Threads

  1. static html page in UX
    By Tbrondolo in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 02-23-2017, 06:46 PM
  2. Method for Opening UX in a PhoneGap or Static HTML Application
    By Scott B in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 05-27-2016, 12:31 PM
  3. Replies: 1
    Last Post: 01-18-2016, 12:48 PM
  4. Green-banding in a static html control
    By CharlesParker in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 10-07-2014, 06:50 PM
  5. Static Data in A5W or html pages. How to make dynamic.
    By mexicomike in forum Application Server Version 11 - Web/Browser Applications
    Replies: 3
    Last Post: 03-14-2012, 01:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •