Skip to content
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

Slow load times #30

Open
jbrozena22 opened this issue Mar 9, 2015 · 3 comments
Open

Slow load times #30

jbrozena22 opened this issue Mar 9, 2015 · 3 comments

Comments

@jbrozena22
Copy link

I am experiencing nearly a second load times waiting for the checkout.js.map to load from Stripe. This is fine on the page where I do my purchase, but I would prefer to not have the script loaded on all other pages to improve their load times.

Is there anyway to have the package insert the script into the html head only on pages of your choosing?

Thanks.

@vectorselector
Copy link

same issue... not possible to add in head as it's telescope... need only for specific template usage....

@vectorselector
Copy link

in the end i had success using manuelschoebel:wait-on-lib package with iron:router to control only loading on the stripe-using template and wrapping the stripe setup with a .rendered function...

Template.myTemplate.rendered = function(){
STRIPE_PUBLISHABLE_KEY = Meteor.settings.public.stripePublishableKey;
Stripe.setPublishableKey(STRIPE_PUBLISHABLE_KEY);
}

@MendelYev
Copy link

I've done a pull request to remove the header part responsible for this : #43

If you don't want to add an other package to load stripe dependencies, you can also use $.getScript inside a Template.myTemplate.rendered block. It worked well for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants