Problem with HTML5 offline in mobile web app - iphone

I can't get offline mode in iphone mobile Safari to work.
I have included my cache manifest file in the root of my directory.
<html lang="se" manifest="cache.manifest">
My cache.manifest looks like
CACHE MANIFEST
CACHE:
/images/background-iphonelines.png
/images/acne.jpg
/images/lisa.jpg
/images/bruno.jpg
/images/urban.jpg
/shops/acne.html
/shops/lisa.html
/shops/bruno.html
/shops/urban.html
/shops/shops.css
/style.css
script.js
guide.html
NETWORK:
*
I also included a .htaccess file in my root directory with the content
AddType text/cache-manifest .manifest
When I'm trying to open my app on my Iphone it still says "Can't open page" (or similar, have my page in swedish).
Does someone have any suggestions what I'm doing wrong?

Your mark-up and cache file look fine, but if the site won't go off-line there's a problem with the cache. It only has to fail on one element, and the whole thing won't work. Have you tried debugging your cache file? This post will help:
Jonathan Stark, Debugging HTML 5 Offline Application Cache
Note this won't tell you which asset causes the failure (if any), but it will tell you if your cache is working or not.

I actually had a similar issue yesterday. Try removing the CACHE: and just listing the items for the cache. I found this by accident and it seems to now work on IOS for me. Also, I added a comment field at the top to make sure I can invalidate the cache. I would give that a try.

I also had the same problem. I included the lines below in the cache.manifest file & it fixed for me.
NETWORK:
*

I was struggling for 2 hours with this and finally I've managed it! HORAY! I've added "/" to cache, this was the problem...

Related

Cannot upload files for release in Github

I want ot create a release for my Github project, but when I try to upload my binary (which is a .zip file) to the release, I get the following error message:
Something went really wrong, and we can’t process that file.
I get the same error message if I try to upload some other files (e.g. my readme file). What could be wrong?
Check first if this issue persists with all browser.
I have seen this error message before, where the upload succeeded with Chrome, but not Firefox.
For the record in my case this was due to an obvious mistake: I had to authorize a github script in NoScript.
If someone encounters this problem in China, and is using ShadowSocks, try turning ShadowSocks off.
I was trying to upload an image file in png format on chrome browser but I was getting the same message.As suggested in one of the answer, I turned off windows firewall and it worked.
But my mind was not satisfied and I turned on Windows firewall and converted that image to jpg format and it got uploaded.
But this stubborn mind was not satisfied and told me to upload this in .png format only.God came to my rescue and accidentally properties tab of png image got opened and at the bottom of tab, it was showing
"This file came from another computer and might be blocked".
So I unblocked it and it got uploaded.
I got that error due to my companies firewall that prevents all file uploads. Might this be the cause of your problems?
The problem occurs during file upload because I was using VPN which doesn't allow file upload hence I disconnected from VPN and then try uploading which work absolutely fine. So my advice to check your firewall/VPN settings as mostly Organization doesn't allow fileupload in GIT due to security concern.
I got the same problem on Opera browser(Ubuntu 18.04.1).
Then I realized that my browser does not have permission to access the related(where your files located) partition. I moved the files that I wanted to upload on Github into accessible partition by Opera browser in my HDD, Thus I could be able to upload my files to Github.
It worked like a charm. Hope this helps.
clear your browser's cookies and cache ..after clearing files will be uploaded easily on git without error
In my case. I'm reuploading two zip files to an existing release. One success and another one failed. Tried in both chrome and firefox.
My solution is to use the hub command-line tool.
I use the below command to edit the existing release and attach files to it.
hub release edit --draft=false --attach FILE TAG
For some reason, I had to change its prefix from .png to .jpg and it worked.
I had the same problem which I solved by disabling my firewall. I hope this will work for you
In my case, it was my anti-virus (AVG) preventing the upload.
In my case, Avast antivirus was blocking the objects-origin.githubusercontent.com site, and made the upload fail.
After disabling the antivirus, I was able to upload the files.
Well! That is because your are uploading some images that you have downloaded from the internet like in my case I have used a favicon that is generated from website to solve the issue Image with security details~img1
Image with detail~img2
Remove personal info ~ img3
To solve the problem
first of all head to the images that you have downloaded from internet and right click on image and click on properties
check the unblock checkbox as shown in image 1 and then
click on the details tab as shown in image 2 and then click on the remove properties and personal information
And then check on the remove the following properties on the file as shown in image 3
And then click on ok and then again ok
The given solution will solve your issue it just worked perfect for me
Files cannot be uploaded because your network provider doesn't allow, use different network or apply vpn for uploading the files.

blank page on Facebook App

We make our Facebook application. Everything was all normal. After I rename one file, all the links do not work anymore. This was not a problem earlier in our application. I have no idea why this is happening.
Any thoughts? If more info is needed, please let me know.
This is my application
Your application here:
http://www.hamilgakhamil.com/sensitifstory/like
missing an image (link) on images/banner-fb.jpg, and the css files also.
To fix this move the css and images directories in the application root directory sensitifstory.

Invalidating an HTML5 cache (manifest) completely?

I have an iPhone web-app, and I want to know how to force a cache refresh.
My cache manifest is this:
CACHE MANIFEST
index.html
file1.css
file1.js
index.html is the meat of the application, so I put that in the cache. At this point, I seem to be boned, as I can't figure out how to get iPhone to invalidate the cache. Even going to Settings > Safari > Clear Cache doesn't work, although I'd like to be able to control this programatically. Removing index.html from the manifest and re-adding it seems to work, but I would have to know that all my clients had a clean hit of the updated manifest.
How do I cache index.html and still have it updated when it changes?
Off the top of my head, any change to the manifest will do the trick - and manifests can contain comments starting with #. Just add a random comment and it'll work.
It's a useful property, when I worked on an HTML5 application in a git repository I used to have the manifest automatically regenerated with a comment containing the HEAD hash after each commit so that the changes always propagate to the users.
There seems to be a bug in WebKit Browsers preventing them to reload the website on manifest changes, see this link
Have no clue for a workaround except when I call the index.html directly.
No chance for a iPad/iPhone-WebApp pinned to do the job...
Yes, you can use JavaScript to force Safari to reload cached resource files.
According to Apple, modifying the cache manifest file will cause Safari to reload any changed resource files. But those reloaded files won't be used by the browser until the user visits the site a second time. That delay can a pain, especially during development.
To force Safari to reload the cache contents immediately, Apple says you can use this JavaScript to manipulate the applicationCache object:
function updateSite(event) {
window.applicationCache.swapCache();
}
window.applicationCache.addEventListener('updateready', updateSite, false);

iPhone Safari offline-cache manifest not working correctly

I'm working on a mobile site for the iphone. I've added a cache manifest and loaded it with a list of resources needed for offline capability. The manifest file has the correct content type. You can view the manifest file in the header of this page:
http://www.rvddps.com/apps/sixshot/booking.html
I had a bunch of links to pages but due to my user level i'm only allowed to post one link. You can see the manifest file there and the source code of the page i'm trying to cache.
I've set the correct MIME type on the server, but the cache only seems to work occasionally.. not all the time. I've tried following apples' official caching guidelines as well.
Can anyone point out where i'm going wrong?
Thanks
Daniel
I looked at the manifest file and found 'Â' characters in some of the blank lines. What text editor are you using? Make sure you use the proper encoding and line ending types.

iPhone WebApp cache

I've made a simple Web Application for the iPhone, it's just 6 pages each with an image on it and I use the Cube transition to switch between them, all static content.
I need this to work on an iPod Touch offline, i.e. visit it once, disconnect from WiFi, and then be able to browse the static site.
I'm trying to do this using the HTML5 manifest feature, but I'm clearly doing it wrong?
My Manifest file:
CACHE MANIFEST
index.html
main.css
main.js
Images/Appointments_Page.png
Images/backgroundStripes.png
Images/button.png
Images/button1.png
Images/button1_clicked.png
Images/button2.png
Images/button2_clicked.png
Images/button3.png
Images/button3_clicked.png
Images/button_clicked.png
Images/CloseIcon.png
Images/CloseIcon_pressed.png
Images/Efficacy_Page.png
Images/EfficacyGraph_Page.png
Images/Graph_Icon.png
Images/GraphIcon.png
Images/GraphIcon_pressed.png
Images/Home_Page.png
Images/Tolerability_Page.png
Images/TolerabilityTable_Page.png
Images/WebClipIcon.png
Parts/ButtonHandler.js
Parts/PushButton.js
Parts/setup.js
Parts/StackLayout.js
Parts/Transitions.css
Parts/Transitions.js
Parts/utilities.js
top of my HTML file
<!DOCTYPE HTML>
<html manifest="cache-manifest">
Hey I figured it out, leaving answer here in case it helps anyone else.
The problem I was having was that our server (IIS6) was refusing to serve my manifest file.
I had to add the MIME type ".manifest" using "text/cache-manifest".
Since then it's been caching fine, all 40+ files ranging from 1kb to 200kb.
Hope this helps.
I also wrote some tips on using the Manifest at: http://wecreategames.com/blog/?p=210
Other things to note: You need to reload the app TWICE to get the manifest's new contents, and you need to change the actual content of the manifest to force reloading the containing pages (I do this by changing a comment #v.03 to #v.04, or something similar).
As a note: Apple suggests:
"The HTML file that declares the manifest file ..... is automatically included in the application cache. You do not need to add it to the manifest file."
(https://developer.apple.com/library/content/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html#//apple_ref/doc/uid/TP40007256-CH7-SW2)
So it would work with leaving "index.html" out of the manifest list.