Jump to content

CORS Simultaneous TCP connexions Limit


3Dlove
 Share

Recommended Posts

Hello guys ans happy new year =D

 

In order to solve cross-origin blocks, I created a PHP script which transfer images from other subdomains but the problem is that navigators implements a Simultaneous TCP connexions Limit (6 for Chrom and Firefox).

To implement CORS I added these lines in my PHP script :

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Credentials: true');

Exists another way to bypass cross-origin blocks ? (download the image in the DOM and use it for WebGL ?)

 

Thanks

 

 

 

Link to comment
Share on other sites

The limits to HTTP connections per server have nothing to do with CORS, and 6 is higher than it ever used to be ( See http://stackoverflow.com/questions/985431/max-parallel-http-connections-in-a-browser )

EDIT: also why would you need more than 6 connections for downloading images, I doubt the extra connections would improve the overall speed of downloading assets significantly

Link to comment
Share on other sites

OK for CORS implementation ;-)

But, I need to load instantly between 50 and 240 different images, but these images are dynamic and they depend of keywords like an online shop so I can't use sprite sheet :-(

 

Because that I would like to request more than 6 simultaneous connexions to my proxy PHP script.

Link to comment
Share on other sites

Ok, thanks Dad72, your solution works ;-)

1 hour ago, Dad72 said:

 

But finally, this is not that the problem :

the total downloads take less 10 seconds but all images are displayed after 20 seconds, BJS do blob one after one I have impression ?

Link to comment
Share on other sites

 

15 hours ago, jerome said:

Actually each image has to be transformed into a texture, then passed to the WebGL context. All this requires some computations.

OK, so the only solution to reduce this time is that I resize image from Backend before to send it to frontEnd ? (with power of 2)

 

EDIT :

Is it possible to trigger the compilation only after the end of all downloads ?

(refer to the following post)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...