I have a website where I use client certificates for accessing the site and it runs with SSL required. It runs on IIS 8.5 on a windows server 2012 R2.
All my css and javascript is minified into 4 seperate files
app.js -> Our own javascript
app.css -> Our own css
vendor.js -> External javascript libraries
vendor.css -> External css libraries
All of these files are minified and placed locally on the server.
The site works very well when using chrome or IE from a computer, but when using safari (only tried safari 5 on PC and latest safari on iphone 6/7) the page can stuck in a "loading" mode. The does not happend every time, and when it does it often helps with clearing the cache in safari and try again.
The website also uses local storage to save some userdata, and a cookie that stores a token for authentication. Not sure if this is useful information, just throwing it out there.
It can connect to the webserver, since we can see the EV+ certificate.
When debugging the phone on a mac, or safari on a PC and looking at the network tab in the developer window I can see that sometimes it takes really long time for the browser to load some of the css and/or javascript files.
Sometimes it appears to be vendor.js, and sometimes app.css, and sometimes the other ones. There seems to be no logic to me, that its always the same files etc.
The site is .NET 4.6 site, running with angularjs, signalr 2.2.1 and html5 in the front.
We have tried
Monotoring IIS Logs and network traffic
Remove sourcemap on css/js to reduce file size
Tried reference signalr/hubs (the generated js file). And also tried copying the content into vendor.js so there is a local version instead
Without any success ATM. I would really appreciate help, feeling stuck on this one.
Many Thanks!
It may be dynamic compression. Are you using Brotli compression on the server?
I suggest a detailed analysis of HTTP Request and Response headers. There may be a discrepancy resulting in this unexpected behaviour. I would follow this up with scouring the Safari bug tracker.
The SSL certificate itself may be the issue, or rather Safari's interpretation of policies.
Hope it helps.
Related
I downloaded the Chrome App samples from https://github.com/GoogleChrome/chrome-app-samples and tried running the FileSystem sample.
The code works when installed from Chrome Web Store, but I'm interested to know whether the FileSystem API can be made to work for non-Chrome-app cases. A simple experiment trying loading index.html on localhost served by my local Apache webserver exhibits a failure because chrome.filesystem is undefined.
Is Chrome Filesystem intended only for Chrome Apps (I can see that clues might be in the name of the samples repo and the fact that it uses a manifest.json) or is there a way of making it work for general (non-Chrome-app) web applications?
Thanks
Is Chrome Filesystem intended only for Chrome Apps
Yes.
is there a way of making it work for general (non-Chrome-app) web applications?
No. Normal web applications are subject to many security limitations (because you "install" them by visiting a webpage).
A simple experiment trying loading index.html on localhost served by my local Apache webserver
Loading resources over HTTP can be done using the XMLHttpRequest object. No escalated privileges on the client required.
I have a Javascript library that loads with my web application (jqWidgets, in case anyone was wondering). However, a customer called because the app was not rendering correctly. When I compared the library file that is served to me vs the one that was being served to my customer, I found that the one being served to my customer is extremely truncated. This only happens when he uses the web app in Chrome; the library loads fine in IE 10. On my machine, however, the library does not get truncated in neither Chrome nor IE. Is there some setting in Chrome that maybe limiting the size of the Javascript file being served to it?
About the application
ASP.NET 4.0 Web Application
Running on IIS 6.0
Both computers running Windows 7
I'm doing some changes in Java script and my application is running in oracle weblogic version 10.3.2. Suppose if I do some changes in the java script in the application deployment area the updated js file is not getting loaded in my laptop. I tried everything clearing the cache using IE options, deleting the files from the folder, Used all the options for clearing cache using the develper tools, I also selected always refresh from server option in the developer tools, restarted my laptop but still the updated javascript file is not getting loaded.
In the server side I also tried re-starting the application and the entire server.
It would be of great help if someone can help on this.
The only way that I'm testing this is by deploying the same application with a different name which is very tedious. I'm sure that this is a problem with IE in my laptop since the browser cache is getting refreshed in other machines here.
Thanks & Regards
Arvind V
I am new for cross platform mobile app development using HTML frameworks like Sencha. Today, I've downloaded Sencha Touch 2.3.1 and tried to open an index file in the examples folder came with the download package.
Surprisingly I couldn't see anything and my console log said
Cross-origin-requests-are-only-supported-in-HTTP
for bootstrap.json
I have seen the same error for some html files on lungo framework's examples. What could be the reason for this ?
I hope all these files will load correctly if I upload them on a server, but I will be wrapping the js file as package while building the app, so this will not work.
I am aware of the Cross Origin Policy which restricts JS to send request to different origin, but I don't understand why this is happening when I have these files locally. Please help me understand this and explain how to overcome this issue.
when you open the page with file:// protocol, the browser disables requests to other files. so when schena touch tries to load bootstrap.json, your browser throws that error. the solution is to host your site on a local webserver and access it through http://localhost/
I recommend appache server, wamp if you're on windows
Another answer explains
I need a database storage system for Javascript where the state can be maintained on the local disk.
Here comes the spanners in the works :-
It only needs to support Internet Explorer but the minimum version must be IE6
Files need to be written so they can be read in again later (upon closing and re-opening of browser)
There can be no web server (unless it's extremely easy to distribute and does not require a install) since the HTML pages will be distributed on USB.
Does anyone know of any solutions that might help here?
Have fun playing with userData. Apparently it does what you want in IE6/7
Then localStorage for IE8/9
Or you can use the heavier store.js which does the feature detection for you and apparently works in IE6+.
It should work in IE9 but no garantuees. I would recommend store.js as it's easier for maintenance and just works out of the box. You can also support other browsers that way.
I don't know if it's supported in IE6, but JScript appears to have some level of support for this through FileSystemObject.
var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateTextFile("c:\\testfile.txt", true);
a.WriteLine("This is a test.");
a.Close();
According to Write binary data with FileSystemObject write(), ADODB.Stream appears to be an alternative.
For strictly local IE work use HTA Applications. Then you can access local resources (text files, ADO databases) without security problems.
try to read this post: Read/write to file using jQuery
Hope this helps.
I would suggest that you not try to read/write using JavaScript but instead head down the road of embedding a small web server on the USB drive. I did this for an app once and it worked out well. I used the Cassini web server.
I created two projects in visual studio. First, I created an ASP.Net web site to read/write from an SQLite database. This site displayed all my content and was built just like any other ASP.Net site. Second, I created a Windows Forms application that hosted the Cassini web server and presented the user with a form that contained a single web browser control. This made the user experience very simple ... they just clicked MYAPP.EXE from the root of the USB drive and the form opens, starts the web server, and navigates the browser control to the start page of the web site.