I have created one HTML5 web app which works in offline mode.I load it first time form server and then when server is off it works perfectly.Webapp url is http://localhost/index.html
Now , if I try to load that webapp first time on any new machine then how can it resolve the localhost url.I have all the resources bundled with webapp.
In this case server is off and browser is not able to locate url http://localhost/index.html
Any idea if webapp can work in offline mode , even if its not connected to server ever.
What you are doing and expecting seems to make sense. It would be smart to check the console in the Chrome Developer tools. Something along the lines of the following should be shown:
You might be serving the manifest file with the wrong content type (should be text/cache-manifest) or the fact that you're working on localhost might somehow interfere (dunno).
Related
I have a web application hosted on azure apps that I publish using visual studio. It is a flask app. One of the templates is called searchresult.html. I am making changes to this file that are made when I run locally. When I run it on the server though the changes are absent.
Using the azure console I can see that the changes are present in the file that is stored on the server, but the application continues to deliver the old html.
How can I force azure to see my updated file?
Things I have tried:
Deleting the file directly on the server and re-publishing it
Committing changes to git, even though I knew that would do nothing
Testing it locally (it works)
Restarting the application
Since you said you already check the file has been changed on the Kudu, so it supposed not an issue of deployment. You could disable caching in your browser.
such as in chrome browser, navigate to F11 window and select the Disable cache blanket.
or please try to access your website via incognito model.
In addition, I crashed into similar issue with you in other web app. My previous solution is that enable always on option on the portal and restart my app, it worked.
Just for your reference.Hope it helps you.
I was working on a html5 file which uses geolocation. It was working fine in Chrome version 38.0.2125.111m from both loading the file locally and from a host server. Now, Chrome does not work for geolocation from either resource. I understand the security issue when running the file locally, but it still happens from any website that is running geolocation. I get the error message of "geocode service failed". BUT runs fine from both resources using Firefox. I have a windows 7 x64 laptop. The code that I am using is right off of Google geolocation example...
I've also went to the chrome's privacy-security-location settings and checked to use allow all sites to check location and still the problem continues... Help!
I think I found a clue. I copied the geolocaton file to another website and ran fine using the same chrome version which makes me believe that it is the google api keys that was causing the problem. I deleted the keys for both local and web host and will see in a few days if indeed this was the case. If it is, then I suggest not to establish api keys during development until app is ready for production.
I am working on HTML 5 offline application. When i run that application on visual studio it works fine but when i stop my application then refresh my page it would fire Manifest error event but my application works fine from local cache.
but when the same application i hosted on IIS 7.5 it works fine until i stop the server. When i stop the server than refresh my page it would generate obsolete event and cache is deleted.
Now i m stuck what to do. I also added MIME type .appcache and type text/cache-manifest
My guess would be that because your browser is technically online (the server is down/offline) it is treating the failure to retrieve the manifest as an error.
And as such it is triggering the obsolete event and deleting the current application cache as per the spec (look at the "Dispatched when..." column for the obsolete event)
So, the appcache is probably working -- or if not, this is not the reason -- this is symptom of your testing being flawed.
Btw, I did the exact same thing - it's annoying not being able to test how your application will fair until in a production/external environment. So be prepared to push your app and realise you missed a resource from the manifest! :)
I have an application that displays my razor views of servicestack endpoints as expected on localhost. However when deployed to azure websites a particular page displays the metadata page for some reason. I don't know how to work out what has gone wrong as it all works on my machine :).
For reference, the view name matches the return DTO. I've tried the site in release mode on my machine. All other pages display as expected on azure and locally. I've cleared the cache and re-started the site from the control panel. I'm running out of things to try.
Any ideas appreciated.
Some general troubleshooting approaches that might help you:
Use Postman, cURL or Fiddler to watch the HTTP traffic between your computer and the website, looking for clues in HTTP headers, requests and responses.
Using FileZilla, connect to your website via FTP. Download the content of /site/wwwroot to a new directory on your local machine. Add this as a virtual website in IIS and run it locally. You'll be running exactly the same code that is deployed.
Instrument your application with tracing in a similar fashion to ASP.NET Tracing and look for exceptions or any other odd behavior.
Refer to Troubleshooting a Web Site for additional resources.
I have a HTML5 webapp which is running perfectly when served via the IIS without authentication.
Is is using a cache.manifest file.
Both when running in safari, and as an "add to homescreen" fullscreen app, once I update the manifest file on the server, and the app will update.
When I turn on authentication on all files except the cache.manifest, then I only see the update when running it in the safari browser.
If I add it to the homescreen, I am not able to make the app update the cache.
If I wireshark the traffic on the server, I can see the manifest file is fetched without problems, but all the files in the manifest file hits a 401 Unautorized error.
Any idea how I can fix this? Running it in the safari browser is working..
Any help is highly appreciated.
Safari is much more aware of HTTP Basic Auth, but web.app (the home screen web app handler, which is basically a UIWebView wrapper) isn't as full-featured and doesn't appear to support basic auth.
It seems you may need to work around this with either a server-side solution to append an authentication key to the filename (such as application.css?longhexkey) to bypass basic auth, or go with a more traditional login form (which may require significant changes to your app)
Same issue on Sencha forums: Unanswered: Forcing re-authentication after offline usage on iOS devices?