Giter Site home page Giter Site logo

Comments (2)

kai-softr avatar kai-softr commented on April 28, 2024

Do you have any chrome plugins that might be the culprit here?

from create-react-app.

Rohitbadekar-639 avatar Rohitbadekar-639 commented on April 28, 2024

There are a couple of reasons why your React app might be calling ws/info and ws/iframe.html multiple times and causing your scripts in index.html to be loaded repeatedly. Here's how to diagnose and fix the issue:

  1. Webpack Code Splitting (Less Likely):

Create React App uses Webpack for bundling your code. In rare cases, Webpack's code splitting might be causing these additional calls.
This is less likely for a new project, but it's worth checking.
Solution:

Look for any code in your components that might be dynamically importing these resources using import() statements.
If you find dynamic imports, consider refactoring your code to load them only when needed.

  1. External Dependency Behavior (More Likely):

It's more probable that an external dependency you've installed is making these calls. Some libraries might use WebSockets or iframes for internal functionality and might be fetching information from these URLs.

Solution:

Review the documentation of any third-party libraries you've included in your project. Look for known behavior related to WebSockets or iframes.
If a specific library is causing the issue, you might be able to configure it to avoid these calls or consider using a different library.

  1. Debugging Network Calls:

Use your browser's developer tools to inspect network requests. This will help you identify which part of your code is making the calls.
Open the developer tools (usually F12 key).
Go to the "Network" tab.
Refresh your page and look for requests to ws/info and ws/iframe.html.
Expand the request to see which script or component is making the call.

from create-react-app.

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.