-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
duplicate css, js #38
Comments
You're right I should add something to prevent multiple insertions / downloads in the native loaders. |
Hi, The original PR for css loading I did back on May 10 had duplicate protection baked into the buildElement function :-) It was just a fairly simplistic approach to track loaded paths... |
Feature added in 0.3.1 :) |
ocLazyLoad 0.3.1 update, but still duplicate loading js/css |
Do you use the native loaders ? |
yes |
Sorry, had to revert and recommit as github thought I'd replaced the entire file. It made it very difficult to see what I'd actually changed. Three small changes, one of which should fix the duplicate load issue. I'll do a PR for it when I've tested it a little more. I need to revisit the last change again in particular as I've had it sitting there locally since 0.2.0 and the whole loading methodology looks to have changed a little bit since I wrote it. I think it's still ok though. B. EDIT: Hold that thought, I had another look and I don't think I've accounted for the OP's original scenario. I'll have another look tomorrow if I get a chance. Feel free to test etc in the meantime though. Need sleep! |
Oh nice catch, I didn't think of those use cases ! |
Any news on this PR @BenBlazely ? |
PR submitted. I actually thought I'd already submitted it on the weekend... A busy week + a baby with a cold/flu = the memory of a goldfish. :-) Good thing I hadn't as I found a couple of small issues and have fixed them. |
ui-router
when access /components/:id , add css,js file every time
$script prevent duplicate call same js not css
I add some code to prevent duplicate css
this method is not accepted jsLoader.
How can I prevent duplicate js, css?
The text was updated successfully, but these errors were encountered: