Coder Social home page Coder Social logo

Comments (3)

jasonmayes avatar jasonmayes commented on July 30, 2024

Thanks for reaching out. This is a known occurrence on some browsers but is actually working as intended. Some browsers pre-fetch data for HTMLElements that are not yet attached to the DOM. Twitter fetcher currently creates a JavaScript variable which stores returned HTML data as a HTMLElement so you can use things like "getElementsByClassName" on that variable to extract data without having to use a regex on a raw HTML string. Unfortunately some browsers it seems are trying to be too clever by fetching images that are not yet attached to the DOM causing the requests in your screenshot above. This is therefore working as intended as the Twitter Fetcher itself does not insert images in to the output it produces. This is taking no more requests than the original Twitter Widget would take if you had used that on your site - so no performance difference there. Also, as they are stored on Twitter's CDN it should load pretty fast though and not cause any extra load on your server. If anyone has any efficient, reliable, and cross browser compatible solutions to this, by all means feel free to submit a pull request and I can take a look. :-) But for now I think this is the lesser of many potential evils in terms of efficiency, and robustness for markup that is subject to change without notice.

from twitter-post-fetcher.

dvorapa avatar dvorapa commented on July 30, 2024

Okay, modern browsers make eerything possible for better performance, but sometimes not in a clever way. Thank you for quick response and also for your awesome work

from twitter-post-fetcher.

jasonmayes avatar jasonmayes commented on July 30, 2024

No problem :-) Thanks for your feedback.

from twitter-post-fetcher.

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.