none
IE not using some CSS or JS files, some of the time.. RRS feed

  • Question

  • I'm working with a client trying to solve a problem that just started on a site I built for her.  The problem started about three weeks ago.

    It's a really simple ASP.NET site: http://nancyjoart.com/  One master page loads a common CSS bundle and JS bundle on all pages, however I used to have then unbundled and only bundled them to try to limit the problem.  It didn't work, but I left the bundles as they do speed the site up.

    One machine on her network constantly fails, a surface pro 2, Windows 8.1, IE11, all updates installed.  Short story:  On four pages, two public and two privately accessed, IE doesn't apply a CSS or run the javascript in the bundle.

    Here are the two public pages that fail:

    If the NAV bar at the top has blue links instead of grey/black, the CSS didn't load.  If the page has no art and shows the loading GIF, or no images, the JS didn't load.

    Now the fun and amazing part: the CSS that doesn't work on these four pages, is successfully used and works on every other page.

    The CSS and JS files do actually get requested and downloaded by IE, as evidenced by a Network Monitor trace session and the F12 tools, but don't get applied (CSS) or loaded(JS) on these pages.

    Now it gets weirder:  I can run the site fine on my Surface RT and my Pro2 from anywhere else without fail.  However, if I'm on her wifi - only half the time I can't get the scripts to run or that one CSS to apply.  I press CTRL+R and they work fine when the page reloads, but only half the time.  In fact, it took me about a half an hour to experience the failure.  Once it happened, my dev machine would exhibit the problem, then it would work, then it would fail.

    In terms of the JS - When it fails, the debugger indicates a class isn't found.  IE has parsed and downloaded that JS file, and shows the file in the debugger file list dropdown  - but doesn't seem to use it.

    Even more odd, the request and responses all appear to happen quickly, all have 200 OK/Success results and the request and response headers look completely normal.  I've even saved the JS file itself and binary compared it to what I have on the server, and it matches, so it isn't somehow getting mangled in-transit.  Even more odd than this little oddity is that once the files are requested and "fail", even if you switch to a cellular connection, the next page loads, and IE doesn't NOT load the files correctly either.  CTRL+R eventually will get it to work on this new connection type though.

    Other things I've tried:

    1. Works on her wifi on:  iPhone, Windows Phone 8.1, Windows Phone 8, Windows Phone 7, Blackberry (Bold and Playbook) and her Windows 7 desktop.  I've put Firefox on her machine, and it works fine every time.   Anything in this list never fails, ever except ie11 on the surfaces.
    2. Her surface is pretty much OOB in terms of apps.  Just Modern apps installed.
    3. My surface pro 2 dev machine is OOB too. used daily for development - Again, site works everywhere but her wifi.
    4. Minifying the CSS or JS doesn't seem to help,
    5. Chkdsk reports nothing,
    6. Windows Defender is the only AV installed,
    7. all Windows updates are installed,
    8. Bundling the css and JS with webgrease didn't help,
    9. I've reset the IE advanced settings, security settings, cleared the cache, tried inPrivate, tried making it trusted, nothing worked.
    10. even reset the wifi router

    She reports other websites all work fine. (** caveat: not sure how complicated these sites are, or how frequently she does this...)

    Does anyone have any suggestions that they'd try next if they were in my sad shoes?


    Darin R.


    • Edited by Darin Rousseau Wednesday, August 20, 2014 12:58 AM bad title. sigh.
    Wednesday, August 20, 2014 12:11 AM

Answers

  • Hi,

    f12>Networking tab, click the start button then refresh the page to view request/response timings.

    http://nancyjoart.com/api/art/ThumbImage/fb958270-8c20-46e9-9adf-05ef6990ec85/250

    Key Value
    Response HTTP/1.1 200 OK
    Cache-Control public, max-age=36000, s-maxage=36000
    Transfer-Encoding chunked
    Content-Type text/html
    Server Microsoft-IIS/8.0
    X-AspNet-Version 4.0.30319
    X-Powered-By ASP.NET
    Date Wed, 20 Aug 2014 02:34:12 GMT

    you are sending back the wrong mime-type + it appears that you are not using response.close after streaming back the image in your asp.net code behind.

    Open a new window in IE... copy and paste

    http://nancyjoart.com/api/art/ThumbImage/fb958270-8c20-46e9-9adf-05ef6990ec85/250

    in the address bar... the image loads but the document.readyState does not reach loaded. there is no EOF in the response body and it is served as text/html not image/jpg.

    ensure Internet Options>Security tab, click "Reset all zones to default"... (IE has security settings for mime types) and also that Tracking Protection is turned off for the site (Tools>Tracking protection)

    + the defer attribute on the <script> tag only applies to script tags with a src attribute... validate and correct your markup errors at validator.w3.org.

    Post questions about html, css and scripting to the IE Web Development forum. Include with your question a link to your website or a mashup that shows the issue.

    Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to raise a question, it's highly recommended you head on over to http://answers.microsoft.com


    Rob^_^

    Wednesday, August 20, 2014 2:48 AM
  • Hi,

    also check the system time on the surface machines....

    Key Value
    Response HTTP/1.1 304 Not Modified
    Content-Length 26597
    Content-Type image/jpeg
    X-AspNet-Version 4.0.30319
    X-Powered-By ASP.NET
    Expires Thu, 21 Aug 2014 12:26:34 GMT


    Rob^_^

    Thursday, August 21, 2014 2:33 AM
  • Hi, thanks Darin for the feedback...

    download fiddler from http://telerik.com/fiddler

    some mobile connection providers inject their scripts into web pages to geolocate mobile connection usage.... look for responses from http://1.1.1.1


    Rob^_^

    Friday, August 22, 2014 12:43 AM

All replies

  • Hi,

    f12>Networking tab, click the start button then refresh the page to view request/response timings.

    http://nancyjoart.com/api/art/ThumbImage/fb958270-8c20-46e9-9adf-05ef6990ec85/250

    Key Value
    Response HTTP/1.1 200 OK
    Cache-Control public, max-age=36000, s-maxage=36000
    Transfer-Encoding chunked
    Content-Type text/html
    Server Microsoft-IIS/8.0
    X-AspNet-Version 4.0.30319
    X-Powered-By ASP.NET
    Date Wed, 20 Aug 2014 02:34:12 GMT

    you are sending back the wrong mime-type + it appears that you are not using response.close after streaming back the image in your asp.net code behind.

    Open a new window in IE... copy and paste

    http://nancyjoart.com/api/art/ThumbImage/fb958270-8c20-46e9-9adf-05ef6990ec85/250

    in the address bar... the image loads but the document.readyState does not reach loaded. there is no EOF in the response body and it is served as text/html not image/jpg.

    ensure Internet Options>Security tab, click "Reset all zones to default"... (IE has security settings for mime types) and also that Tracking Protection is turned off for the site (Tools>Tracking protection)

    + the defer attribute on the <script> tag only applies to script tags with a src attribute... validate and correct your markup errors at validator.w3.org.

    Post questions about html, css and scripting to the IE Web Development forum. Include with your question a link to your website or a mashup that shows the issue.

    Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to raise a question, it's highly recommended you head on over to http://answers.microsoft.com


    Rob^_^

    Wednesday, August 20, 2014 2:48 AM
  • Since the JS loads all these images, you've already gotten farther than the problem system, but I appreciate the pointers!

    • I fixed the content type of the images.  I'm not sure how to proceed with the content not being closed - I suspect the DOM isn't coming ready because it's assuming HTML, getting binary and can't parse it.
    • The defer="defer" attribute was to demonstrate that the inline scripts were not running async before IE loaded the external JS files(/bundle).  that wasn't the case.
    • I believe I had reset the zones security settings to default; I'll check on that.

    Darin R.

    Wednesday, August 20, 2014 3:49 PM
  • Hi,

    also check the system time on the surface machines....

    Key Value
    Response HTTP/1.1 304 Not Modified
    Content-Length 26597
    Content-Type image/jpeg
    X-AspNet-Version 4.0.30319
    X-Powered-By ASP.NET
    Expires Thu, 21 Aug 2014 12:26:34 GMT


    Rob^_^

    Thursday, August 21, 2014 2:33 AM
  • Thanks - I didn't think of that.  Time was correct. I even turned off NTP, set it incorrectly and then turned NTP back on to ensure it was refreshed.  I wish I could say that it worked.

    I dug a bit deeper: The issue's first report was August 12th, when coincidently a bunch of Windows Updates had been installed.  Only one for IE though other than flash is this:
    https://technet.microsoft.com/en-us/library/security/ms14-051.aspx  (Can we uninstall IE updates, or only Windows /Office Updates?)

    The site was running on stable code from July 29th to Aug 12th without changes.  I made a change on the 12th to attempt to resolve the problem.

    To narrow it down, the combination that I've determined now fails consistently is:

    • [IE 11]  * [Windows 8.1] * [that particular WiFi connection & ISP]

    If any one of the above variables change, the site works flawlessly.  (A different machine on the same WiFi/ISP works.  A different browser onto he same Machine works.  The same browser & machine on a mobile hotspot works).

    I'm going to try a trip onsite to see if I can score some network logs from broken/working sessions on the same system.


    Darin R.

    Thursday, August 21, 2014 9:48 PM
  • Hi, thanks Darin for the feedback...

    download fiddler from http://telerik.com/fiddler

    some mobile connection providers inject their scripts into web pages to geolocate mobile connection usage.... look for responses from http://1.1.1.1


    Rob^_^

    Friday, August 22, 2014 12:43 AM
  • Wouldn't you know it..  I was on site today, installed fiddler on my Surface Pro 2.  I couldn't get a failure.

    I then allowed fiddler connections to my machine, started the client's Surface, it failed first when I just refreshed the site, failing to load the one CSS and the one JS file.  I setup the fiddler proxy on her machine, restarted IE on the desktop... and it worked.  And worked...  and worked.

    I uninstalled the proxy, it still worked.  In fact, while I was there, the client used the site to do some admin tasks for over an hour and a half - everything she reported just worked.

    I double checked that no updates had been installed since the 12th (except defender).  Maybe a red-herring there with updates.  Client again reported that yesterday it wasn't working at all, today is 100% OK.

    Due to the lack of changes on the clients end, maybe some sort of ISP/cache involvement was to blame?  If they were monkeying around with content via user-agent header, That would explain why it would only fail on her machine and mine and the rest of the devices worked fine.  I'm at a loss.

    Anyway, I appreciate all the help for the suggestions, the time spent and thought put towards this.


    Darin R.

    Monday, August 25, 2014 2:15 AM