You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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.
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.
I have setup new project using create-react-app, and saw my scripts inside index.html are called multiple time
The text was updated successfully, but these errors were encountered: