This extension let you to add some random hosts to add this part equally distributed to have more responsive times in your server.
You can add a mirrors and load all images from mirrors to make their requests without cache and also avoid the navigator parallel host requests limit (5 aproximatelly) and make your page load faster.
Resources ¶
Documentation ¶
Requirements ¶
- Yii 1.0 or above
Installation ¶
- Extract the release file under
protected/extensions
Usage ¶
See the following code example:
In config/main.php (or your configuration file):
...
'components'=>array(...
'parallelize'=>array(
'class'=>'application.extensions.parallelizeurl.ParallelizeUrl',
'hosts'=>array(
'http://m01.artfos.com.ar',
'http://m02.dev.artfos.com.ar',
'http://m03.dev.artfos.com.ar',
)
)
...
To use it just do the following anywhere in you app:
$imgsrc = yii::app()->parallelized->getParallelizedHost() .
yii::app()->baseUrl . '/images/img0020.jpg';
and it will get a random host for you.
Change Log ¶
June 13, 2009 ¶
- Initial release.
sequential
Is there away not to make the hostname random, but sequential instead? I believe you can make use of static variables like CWidget does to generate the widget ID when not given.
error
Hi,
I tried to use this extension and got error like
Property "CWebApplication.parallelized" is not defined
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.