3

I have an ASP.NET MVC5 application on IIS Server and the login page is loading too slowly after clearing the history of the browser. As it can be seen on the Network field of Developer Tools, there seems to be a serious problem regarding to loading of page contents i.e. css and js files. So, could you please clarify me how to fix this problem for font-awesome and for the other files? How can I increase the page's and the other content's loading?Please note that I first load css files and then page content and at last javascript files. Any help would be appreciated...

enter image description here

Jack
  • 1
  • 21
  • 118
  • 236

2 Answers2

1

You can try bundling and minifying those assets in App_Start\BundleConfig.cs

johnniebenson
  • 540
  • 3
  • 9
  • Yes, you seem to be right. I can also try to it. Voted+. Also can you please look at my last comment regarding to google-fonts? – Jack Dec 29 '16 at 06:35
1

It seems your browser speed is low. As you've already used minified version and size is not greater than 25kb,still its taking 15 secs.

Other way is to cache those files in browser and reuse everytime(after first call)

caching JavaScript files

Browser Caching of CSS files

Also, i would suggest the following priority

1.Load JS Many times I've faced Js dependency problems. Make sure to load parent js first, then child. Also, try shuffling the js priority, might help you

2.Css

3.Page content

edit Google font offline Downloading a google font and setting up an offline site that uses it

Community
  • 1
  • 1
Dirty Developer
  • 551
  • 5
  • 22
  • Yes, you are right. Today I have tested several times by the same method and it is loaded just 1-2 seconds :) On the other hand, I think sometimes **google-font** may cause slowness if there is a problem for loading it. For this reason I used to include it to local but not worked properly. How can I use google-font in local? I tried to copy it to local and included by ****. Is there a better way to fix this problem? – Jack Dec 29 '16 at 06:34
  • I haven't used it but you have tried copying it but have you cleared the cache before using it?? – Dirty Developer Dec 29 '16 at 07:26
  • Do you mean the browser's cache? I cleared by cleaning all of the history, but sometimes cannot be cleared completely. Any idea? – Jack Dec 29 '16 at 10:37
  • If you re using IE you have option to clear cache in dev tool(you can open it by pressing F12) almost for all browsers you can try ctrl+shift+Del and delete everything except history and stored passwords or preferences if any. Also i have updated my answer with some links for offline Google fonts – Dirty Developer Dec 29 '16 at 12:17