IE looses JQuery when MVC app is refreshed in Browser RRS feed

  • Question

  • User-607600318 posted

    I have a standard MVC app built in ASPCore.

    My Layout.chtml file contains all the Jquery includes, and the application loads and works correctly until I do a page refresh.

    With page to page navigation, JQUERY loads and all my scripts work perfectly.  I press F5 in IE 11 and I get errors that JQuery cannot be found.

    Also, this just started happening 3 days ago, randomly after a build midway through the day.  I have been building this app and testing it for months without any issues.

    I have also tested this in Firefox launched from Vs2017 as my default browser, it appears to randomly have a similar issue, but if I refresh the page in FF more than once, it loads. This does not happen in IE, IE just keeps failing.

    Is there an IE Settings somewhere that might have gotten changed? I've tried everything I can think of, or in VS 2017 itself?


    Friday, June 29, 2018 12:46 PM

All replies

  • User475983607 posted

    Use the browser's developer tools to find the error most likely a file reference issue.  The random behavior might be due to browser cache.  Dev tools definitely help you troubleshoot this issue.


    Friday, June 29, 2018 12:54 PM
  • User-607600318 posted

    I have never been able to get the app to load in Chrome, I constantly get this page, and it never loads.

    Chrome script debugging in Visual Studio is enabled

    • Set breakpoints in JavaScript/TypeScript in Visual Studio
    • Automatically break on script errors
    • Opening developer tools in Chrome stops the script debugging session

    Learn more about Chrome debugging in Visual Studio

    Your application is starting...

    Friday, June 29, 2018 1:02 PM
  • User475983607 posted

    Press ctrl-F5 in Visual Studio to start without debugging.    Or use a different browser as all modern browsers have developer tools but it seems like you have coding errors you need to work out.

    Friday, June 29, 2018 1:06 PM
  • User-607600318 posted

    Thanks for your response, I can launch the application perfectly fine in Chrome, FF and IE without debugging (CRTL-F5).   I don't get any errors or JQUERY problems.

    It appears to only happen when in DEBUG mode, the dev tools indicate that the files are being referenced correctly, but it still bombs out..

    It pulls me back to my questions about the IDE and what it might be doing or not doing when I launch in Debug mode.

    Friday, June 29, 2018 2:38 PM
  • User283571144 posted

    Hi Michael S,

    In my opinion, the difference between debug mode and without debugger mode is the setting in the Startup.cs's Configure method.

                if (env.IsDevelopment())

    I suggest you could firstly check the Startup's method to make sure you don't add something when env.IsDevelopment.

    Besides, I suggest you could try to change the ie emulator version and try again.

    About how to change the emulator version, you could refer to below image:

    Best Regards,


    Monday, July 2, 2018 9:33 AM