Why does my web-app work offline in Firefox, but not on iPad? - offline

I recently wrote a few scripts for Javascript which I am trying to run as a native app on my iPad in offline mode.
The scripts do nothing complex, simply run off a bunch of prompts and generate a document.write() based on the information the user has entered.
So I set up my own little website to host the scripts on and went about setting up an application cache. I am new to this sort of thing however from what I gather, I have followed instructions correctly. To set up my app cache, I did the following:
Added the following two lines to my .htaccess file:
AddType text/cache-manifest .manifest
AddType text/manifest .manifest
Made a new file called "generator.manifest", which has the following lines:
CACHE MANIFEST
generator.html
answergenerator.js
And added in to my generator.html file:
Apart from a few functions used to prompt some iOS features, all I have in my generator.html file is this:
along with the other stock standard html tags.
That is my appcache setup. The generator.manifest file is in the exact same directory as the generator.html file.
When I enter Firefox and go to my site, I can run the script, allow it to cache files for offline usage (Firefox comes up with a prompt), and then run the script in offline mode.
HOWEVER, whenever I try to do this on my iPad (4.2.1), I simply get the error: "Generator could not be opened because it is not connected to the Internet."
Where have I gone wrong? Can someone help me fix this please?
A huge thanks in advance,
Haz.

You might look at this answer. iOS does seem to have some issues. I found that I had to power cycle my iPad (in addition to clearing open Safari's) before it would recognize the appcache.

Related

Detect navigator inside WebExtension's manifest.json

I am currently working on a WebExtension and I have a small problem. On my Firefox browser I'm able to import and run my work without any error/warning. However with Google Chrome I have a big warning about a feature not implemented (the browser_style property of manifest.json key options_ui).
I'd like to create something like an if statement based on the navigator name to not set this property on Chrome but keep it on Firefox.
Here is the part of my manifest.json:
"options_ui": {
"page": "contents/settings.html",
"browser_style": true
},
And here is what I'd like to have (not working):
"options_ui": {
"page": "contents/settings.html",
if (options_ui.browser_style) {
"browser_style": true
}
},
Any ideas on how to create a condition like this in a manifest.json file?
As Daniel Herr implied in a comment, the manifest.json file is straight JSON formatted data. JSON has no capability to run code. There is no possibility to dynamically define properties within your manifest.json file. You have 2 options:
Live with the warning(s).
Both Chrome and Firefox have valid properties defined for manifest.json files which the other does not support. Both show warnings when there are unsupported properties. These are only warnings and do not cause the browser to prevent the extension from running. Chrome prominently shows these in chrome://extensions/. Firefox shows them in the Browser Console (Ctrl-Shift-J, or Cmd-Shift-J on OSX).
Have a separate manifest.json file per browser.
This adds some complexity to your build/development process, but will allow you to eliminate these warnings in each browser.
Note: Even if you don't submit different manifest.json files to Google (Chrome Web Store - Extensions) and Mozilla (AMO), by the time the extension package is distributed to the user, the manifest.json files and other contents of the extension package will be different, as the process of going from submission to distribution results in that file being modified and/or additional files being added to the extension package.

How to generate CHM with Doxygen and HTML Help Compiler?

The short story: I can generate a CHM file with Doxygen. Launching the CHM file, I observe that the Contents and Index tabs do list the pages, namespaces, classes, and members of those classes. However, clicking on the items in those Contents and Index lists do not display any content.
I am on a computer using Windows 7 Professional SP1, 64-bit.
I use Doxywizard to run Doxygen version 1.8.9.1 on my code. It correctly generates the HTML output; the pages, namespaces, classes, and members appear in the documentation.
I then further want to convert the HTML into a compressed HTML (CHM) file.
I downloaded the Microsoft HTML Help Workshop version 1.31 (i.e., htmlhelp.exe version 4.74.8703 ) from the Microsoft website ( https://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx ). I ran the installer. As the installer was proceeding, a popup message appeared:
This computer already has a newer version of HTML Help.
However, installation completed successfully. And, the hhc.exe program is there where I told it to install.
I now specify these relevant Doxygen settings:
Wizard --> Output:
HTML is checked
"prepare for compressed HTML (.chm)" option is selected.
Expert --> HTML:
GENERATE_HTMLHELP = YES
CHM_FILE = Foo.chm
HHC_LOCATION = C:\Program Files(x86)\Microsoft\HTML Help Workshop\hhc.exe
When I run Doxygen again, it reports an error:
error: failed to run html help compiler on index.hhp
The Foo.chm file is generated where expected. But, as described above, it is missing a lot of content.
I tried running hhc.exe manually on the HHP file generated by Doxygen. It does not indicate any errors.
C:\Program Files (x86)\Microsoft\HTML Help Workshop>hhc c:\test\html\index.hhp
Microsoft HTML Help Compiler 4.74.8702
Compiling c:\test\html\Foo.chm
Compile time: 0 minutes, 3 seconds
292 Topics
3,855 Local links
83 Internet links
0 Graphics
Created c:\test\html\Foo.chm, 259,580 bytes
Compression decreased file by 1,077,915 bytes.
However, the result is the same: a Foo.chm file that is missing content.
I subsequently found that I had another installation of the HTML Help Workshop on my computer. But, the hhc.exe was the exact same version. So, that is not likely the problem.
Can you suggest what else I can try to get all the documentation content to display in the CHM file?
When I have seen this problem (the html exists and the chm has content but that content is not visible), it has been because windows security has "blocked" the chm file. To see if this is what you are encountering try the following:
From windows explorer, Right click the generated .chm file and select properties.
On the General tab, if you see an Unblock button, click it.
Close the dialog and open the .chm file.
(I have not encountered this problem with locally generated doxygen .chm files, but I am hopeful from your description that this may fix your problem.)
The essential problem was that the CHM file was on a mapped network drive.
When I copied the CHM file to a physical drive on my computer, all the content displays.
In your doxyfile, put the path to hhc.exe in double quotes, since it contains spaces.
Or even better, do not use paths with spaces.

Cannot save file in WebStorm 9

I have been using the same workflow for months to add a new page in my ASP .NET site, but all of a sudden I am getting problems with trying to save a .ascx file inside of WebStorm.
I created the .ascx page in VS and then saved it. I then go over to WebStorm to start developing and I cannot save any of these new files. I get this error:
Following errors occurred on attepmt to save files:
C:\...\Management\Management.ascx___jb_bak___ (Access is denied)
I don't get what this file is and why it can't be saved... The jb makes it seem like a JetBrains file, but this file doesn't actually exist in the filesystem. All the other files I have had work just fine. Its just this new file all of a sudden.
What does this error even mean.. there is no valuable information
This error happened to me everytime I used Nodemon to start Webpack on a separate process. The problem was fixed by disabling "Safe write" in "Settings", as VyvIT suggested.
Hello to Developers using Jetbrains products!
I had this problem today and I think it was for the webstorm but I check my E: drive that I was developing on.
The problem was with my hard drive that changed to read-only.
I changed my drive to C and it solved.
Check your drive that you are using. That might be the problem.
You need to change your security options for user in Windows:
Right Click
The Folder > Properties > Security Tab
Click on
Edit to change Permissions > Select User

Not able to save file deployed on jetty server

I have deployed my webapplication on a jetty server, and I am trying to edit those deployed files using WebStorm 8.0.4. But I am unable to save the edited files and getting the following error:
Try turning the 'safe write' feature (Settings/General, 'Use safe writes') off - does it help? It creates a temporary copy of a file: creates a separate temp file, deletes the original and then renames. With this option the original file permissions may be lost, this causes problems, especially when working on remote drives.
Follow these steps.
Open C:\Users\YourUserName\.m2\repository (If you use maven)
Find org folder and Navigate org\eclipse\jetty\jetty-webapp\yourJettyVersion
There will be a .jar file.
Open it with winrar or some program like winrar.
Navigate org\eclipse\jetty\webapp
Find webdefault.xml and Open it with any text editor.
Search useFileMappedBuffer parameter in file
You will see a param value.
Change it to false.
Save and Exit.
I'm sorry for any English mistakes.

JFolder: :folder: Path is not a folder. Path:

I'm receiving the following error JFolder: :folder: Path is not a folder. Path: (with no path) when i create a menu item based off a K2 item. Its a fresh install with only k2, Gantry Framework (with throws the same error on install), a template installed, and a few items created...
As you see from the tag its Joomla! version 2.5.14. The PHP allow_url_fopen setting is disabled. This setting must be enabled for the updater to work.
(this is because i'm using Yahoo Small Business and from my understanding they don't allow customization of php settings and i'll never use them again after my year is up).
I've seen the issues on temp and logs and they are both ./logs or ./tmp
The template also looks pretty messed up but works fine on another site i have.
Other than that its all pretty new. Anyone have a work around or fixes for what i'd doing?
Switch to a host that is set up to run Joomla. All of your errors are server configuration related.