Click here to Skip to main content
15,887,821 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am using asp.net MVC application which uses jquery as client scripting language.
In my Shell page I am loading some of the required JS files, on click of one link
with the help of jquery ajax , on success i bind new view within my shell page.

But I am getting following in my firebug in scripts section.
jquery- 1.7.min.js
jquery- 1.7.min.js line 2 > eval(1)
jquery- 1.7.min.js line 2 > eval(2)
jquery- 1.7.min.js line 2 > eval(3)
jquery- 1.7.min.js line 2 > eval(3)
jquery- 1.7.min.js line 2 > eval(3)


JavaScript Developers Please suggest the way to load this JS only once.
Posted
Updated 18-Dec-15 2:34am
v2
Comments
F-ES Sitecore 18-Dec-15 6:18am    
Use the network tab of the dev tools to see if it is being loaded multiple times.
ZurdoDev 18-Dec-15 8:34am    
The eval ones might actually be the results of some asynchronous calls and it's not that the file is being loaded again. Open them up to see what is inside.
Anurag Gandhi 18-Dec-15 12:14pm    
Please provide the code snippet you are using.
Remember that with JQuery and Ajax, it will not clear previously loaded files automatically.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900