Javascript file sometimes truncated - javascript

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

Related

safari loads css/js very slow on client certificate SSL website

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.

QtWebKit or Server side? Can't translate xml: ReferenceError: Can't find variable: XSLTProcessor

I need to open a webpage inside a QWebView in my Qt Widgets Application.
The web works fine, except one part, where some files are not downloading from the server.
I inspected the QWebView and I found that error in the title...
It seems weird, because I tried to compile my app in linux with same Qt version and it works fine, no error in Web Inspector console... I tried compiling with MinGW32 and also with MSVC 2013 with same results.
I tried the same webpage with Qupzilla WebBrowser and it works!!, even in Windows (so I am afraid that is Qt setting in my app, that is only needed in Windows environment, but I couldn't find for it in the QupZilla sources...)
Error detail in windows:
(In linux the same action produces no error)
Top: Linux build, processed 45 requests, Windows build(bottom) stopped at 15 requests..., same code:
Another things I tried:
- Changing user agent
- Playing with QWebSettings
- And maybe another unuseful tries.
Any clue to get my page fully loaded into the Windows QWebView?

Use javascript source-maps with phonegap

we are shipping a Cordova WebApp for tablets with minified source using uglify2-compressor via grunt-contrib-requirejs. We generate source-maps for debugging which work flawlessly using the chrome desktop browser via remote Debugging on a KitKat Android Tablet.
Now we like to send error reports from our customers to our server. The Android WebView does not seem to care about our source maps. Therefore we get error message like "line 1, char 1231231" - not very helpful...
The Question is: Is it possible to use source-maps with the Android (and iOS) Webview maybe using a Cordova plugin or do we have to wait for an update (Chrome and Firefox Desktop are able to parse the maps...) and ship un-minifies code so that we are able to get the line number of the occurred error?
From Chromium discuss topic
DevTools downloads source maps using the front-end browser, not the one that runs the inspected page. So file://android... is never going to be accessible. You need to point to the files on your development box instead.

Running offline AJAX appliaction on Opera Mobile 11

I'm preparing project for web application with large AJAX usage, which should work on Smartphones. One of requirements is that the application should be able to run without internet connection. The scenario when application is launched and then the internet connection is lost is relatively simple, but what in case the user have no internet connections, and wants to launch this application?
Opera Mobile has the ability to save the page, which could be loaded even without internet connections, the problem is however the fully AJAX application. I've checked 2 examples: GWT-Ext Showcase and ZK Calendar Demo, both of them running in online mode, but failed to launch in offline mode (blank screen, with no error message). I suppose the problem is the Opera saved the main page itself, but not the required JavaScript. In this fall I have question:
What should the developer do to make his web application running in Opera Mobile in offline mode? How should the JavaScript be organized to be downloaded by Opera for offline mode?
You should specify a cache manifest file.
You could also just paste all the javascript into the main html page (inline) (more difficult to do with images though)

Is it permited to download javascript code to iPhone

I have an hybrid application, it's basically a website running from the application folder inside a UIWebview.
The problem is that I was planning to update my website by downloading the whole website from internet and then replacing the old website.
Today I found that Apple now provides the App Store Review Guidelines and among others there are the following rules:
2.7 Apps that download code in any way or form will be rejected
2.8 Apps that install or launch other executable code will be rejected
Because my site has html, css and javascript, does that mean that my app will be rejected or is there any chance to be accepted?
What are your thoughts on that?
From the new text of of the application developer agreement, regarding downloading executable code:
The only exception to the foregoing is scripts and code downloaded and run by Apple's built-in WebKit framework.
This includes javascript and hybrid applications, so you should be fine.
Although, taking all of this into account, why didn't you just allow your app to take advantage of the iPhone webapp stuff? You still get an icon on the home screen, and get rid of the browser chrome without having to get Apple to approve your app.

Categories