Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC pages aren't served over 3G or certain proxy servers

We've just pushed out a new ASP.NET MVC based web-app that works fine on all desktop connections, and all mobile devices such as iPhone, etc. However, when certain pages are viewed over a 3G connection (either via a 3G dongle on a laptop, or directly on a mobile device), a blank, white page is served with no content of any kind. It appears as if we've returned an empty request.

On certain proxied networks, we're getting a similar issue whereby they say our request size is too large. This sort of makes sense, as it only affects certain pages, and I would assume the mobile network providers operate all manner of proxy servers on their side.

However, I've not been able to find any information on what would constitute a request that was too large. I've profiled one of the pages in question, here are some of the stats I thought might be relevant:

HTML content size: 33.04KB compressed, 50.65KB uncompressed
Total size of all stylesheets (4 files): 32.39KB compressed, 181.65KB uncompressed
Total size of all external JS (24 files): 227.82KB compressed, 851.46KB uncompressed

To me, the compressed size of the content is not excessive, but perhaps I'm wrong. Can anyone advise on what I can do to solve this problem, as I've had a really hard time finding any definitive information on this.

like image 659
pauldunlop Avatar asked May 10 '12 09:05

pauldunlop


1 Answers

As far as the MVC is concerned 3G networks are no different than Wifi. However there is a limitation on the size of the files that mobiles can Cache. In that case those files will be requested from the server with each postback.

Since some of the pages do work, I think its a good idea to isolate the problem to specific point of failure than searching in wild.

You can debug problems easilt with a 3G dongle and firebug in Firefox or Chrome developer tools

  • Make sure there are no Java Script errors in the first place that's causing the problem
  • Confirm the Javascript/css/html files are indeed delivered to the client. (Firebug on the client). On the server check the IIS logs or MS Network Monitor or create a http proxy where you can monitor the traffic. Try which ever you are comfortable with.
  • You have nearly 30 requests just for css/java script/html and the count may be higher if you have images. Completeting all those requests may be taking forever on 3G. Try bundling the Java Script files and reduce the request count. Browsers have limitation on number of simultaneous requests they can make, adding to the over all time (Firefox I believe can make around 10 simultaneous requests).
like image 174
Syam Avatar answered Nov 22 '22 11:11

Syam