Code Monkey home page Code Monkey logo

Comments (6)

benjaminhoffman avatar benjaminhoffman commented on June 19, 2024

looking into this.

from gatsby-plugin-mailchimp.

benjaminhoffman avatar benjaminhoffman commented on June 19, 2024

interesting. we can do that. but the bigger question is, how to make it work with privacy plugins? there's no reason it shouldn't.

anyway, would something like this work?

for this line: https://github.com/benjaminhoffman/gatsby-plugin-mailchimp/blob/master/src/index.js#L14

could be this: return jsonp(url, { param: 'c', timeout: 60000 }, (err, data) => {

thoughts? want to open a PR?

from gatsby-plugin-mailchimp.

steebchen avatar steebchen commented on June 19, 2024

Well your line of code simply wouldn't change anything - jsonp uses 60000 as timeout by default. I'd suggest to lower this value to 5000 or 10000.

What mailchimp does by default is setting the "action" attribute on the form so it simply fallbacks to POSTing to a new tab where you can confirm your subscription. However, I'm not sure how to do this here because we don't know whether the request will fail before we send it.. and we can't open a new window because it will be blocked by popup blockers.

from gatsby-plugin-mailchimp.

benjaminhoffman avatar benjaminhoffman commented on June 19, 2024

hmm. so not much in terms of finding a workable solution? i think the next best answer is to leave a comment in the README. any ideas on this one?

from gatsby-plugin-mailchimp.

steebchen avatar steebchen commented on June 19, 2024

No, but as I said I would just use a timeout of around 5 seconds. An error message is better than a 60s timeout where the user bounces because he doesn't know what's happening. The error message could include that adblockers or privacy plugins should be disabled.

from gatsby-plugin-mailchimp.

benjaminhoffman avatar benjaminhoffman commented on June 19, 2024

8fffe3a

thx again @steebchen for the issue and suggested fix!

from gatsby-plugin-mailchimp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.