appcache not working any more - not loading offline - html5-appcache

I have tested my website thoroughly offline (just using localhost). And I have never had a problem with appcache - such that I could load my website, disconnect my phone from the wi-fi, reload the website and I could still view it.
Now I have put my website online (ie. http://subdomain.example.com) - the code is exactly the same - and I try the same thing.
It will just not work. Chrome on my phone says wi-fi and mobile are unavailable and the page can't be loaded.
I just don't understand. Is there anything that anyone can think of that is different about working locally to working on a remote server?

If anyone else has this problem in the future, check your paths in .appcache
In turned out that the change between local and online (ie. 10.0.0.10/myapp/Symfony/mobile vs subdomain.example.com) meant that the / I had in the first line of my manifest was pointing to different locations on both local and online.

Related

Firefox on iOS reloads old page although history and cache cleared

I am working on a web page, which I want to test on my iPhone. However, when I visit the website from my phone in either Firefox or Safari it is an old version of the website that opens. I have tried to clear cache and history as described here, but it is still the old website that appears. I have also tried to de-connect my Firefox account and restart both the app and the phone. I have checked in a browser on my computer and here I see the new website and any changes implemented instantaneously.
Do anyone have similar experiences with such an issue and how to solve it?
Edit 1: After a while (couple of hours) I tried again and it was indeed the new page in the mobile browser. I still don't however understand why there is latency in a mobile browser and not elsewhere, i.e. where and why is the old page cached on a mobile device even though history and cache has been cleared?
Edit 2: I have now also discovered that the same issue applies to all other non-mobile browsers than FirefoxDeveloperEdition, so this browser must be doing something the others don't.
I faced similar issues in past. It depends upon your hosting provider. Usually it takes no time to update web pages but sometimes average hosting sucks.
Try opening webpages in incognito mode/private mode.
My problem was solved by running cache-purge from my provider's SSH service.

Cordova app, using remote website - How to handle connection issues?

My problem
I'm working on a project where Cordova is being used to display a remote website within the app. Cordova.js is being run from the remote server, etc., and this works pretty well.
I do have one issue though, especially on iOS devices.
If the device lose connection at the same time as I press a link on the website, the page will turn blank, as if to load the next page - but since the connection is lost nothing will be loaded into this blank page. Given iOS devices lack of back-buttons or such there's no way to navigate from this blank page except by closing the app and re-opening it.
My attempted, and failed, sollution
So, given that I can use Cordova.js to check for connection issues, I figured that I could use an iframe to display the remote website. If the connection goes bye-bye I'd just display a simple error message inside the iframe.
And well, this does work.
BUT. And this is a big but. InAppBrowser will not run from an iframe. And I can't live without the InAppBrowser, since it's used to display quite a few important features within the app.
So
Does anyone know a way to either:
a) Handle connection issues when running only remote content in the Cordova app?
b) Run the InAppBrowser from within an iframe? (I suppose I could use PostMessage etc. between the frames, but since I'm already sending/receiving data from the InAppBrowser I would love to avoid this in order to limit complexity).
c) Solve this issue in another fancy manner?

Caching issues with my router?

I'm working from home today, and I've been trying to edit the stylesheet in my wordpress installation for the last hour, with no changes reflecting on the website.
I have tried:
Firefox, chrome, safari, and opera on my Mac
Hard refreshing with F5, and alt+refresh button in browser
Looking at it on my iphone
switching off the wifi, and using 3G on my iphone (This Worked)!!!
So I'm wondering if there is a way for my router to cache something? Since it doesn't seem to just be my one computer, but my wifi in the house in general. What sort of things can I do to get this to un-cache??
This is my site:
http://www.christmaslightsinstallation.ca/
The sidebar headings should have a green background. I see this on my phone now using 3G, but not on my computer.
Please check following issues:
If you are using CDN like cloudflare or maxcdn then please login and delete cache
Please check if your hosting provider is using the static cache or not then try to login cpanel and clear cache.
Check if your server/hosting using any proxy cache and try to delete them.
Disable all of caching plugin of your wordpress installation
Good luck and please show here if it still happen.

Web Page for iPad: how to send data to server without PHP

I've developed a website that uses some PHP to write the client's user responses to a data file on my server. I've realized that the iPad cannot run PHP sites, and I'm at a complete loss as to what a good alternative would be. Javascript and HTML can't be used to write to a server, right? Help?
Thanks in advance.
Edit: I fixed it. The problem was that the iPad has problems with recognizing .click. I had to change it to .bind("click tap touch", function.... instead. It's weird how it was still able to recognize the click events that did not initiate a form submission (that is, when I was still using .click, the button worked, except for when it had to submit a form).
You'll need to put the PHP scripts up on a web host (e.g. GoDaddy.com or BlueHost.com) and then navigate to the website from a web browser on your iPad. The PHP will run on the server and so it will work whether you access it on a PC or an iPad.
While your developing, you could also access the server running on your computer from your iPad by navigating to http://<ip-address-of-your-computer>/myscript.php from mobile Safari or Chrome.
[EDIT] - Please note that the second option will only work while your computer and iPad are both on the same network.

How do I prevent Mobile Safari from accessing the network for a cached webapp?

I have a simple web app that I want to use locally (i.e. I don't want it to ever access the network). All the code is packaged according to the Safari Web Content Guide. I was successful in downloading my web app to my iPhone. I noticed, though, that even though my web app doesn't connect to anything remotely, there will be a network access (the network access indicator fires).
I suspect that iOS is checking to see if the web app is fresh (i.e. checking the cache manifest to see if it needs to update any files). Is there a way to prevent this? It really screws up the user experience.
The never-ending network spinner is a bug in iOS; you won't be able to get around it with a web app:
http://www.devthought.com/2012/09/22/understanding-the-ios6-ajax-bugs/

Resources