Posted by mavimo on January 11, 2009 at 11:06am
Jump to:
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | base system |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
This patch move CSS and JS aviable into header in mirror url; patch change file:
- include/bootstrap.inc
- include/commont.inc
Usage
- apply patch to file
- add into settings.php for current file the code
<?php
$base_url_mirror[] = 'http://static1.mysite.tpl';
$base_url_mirror[] = 'http://static2.mysite.tpl';
// ...
?>
change path name for static. Use one or more static domain, encrease number of static domain can slow down performance (long dns lockup time response). - Configure your mirror server to copy all static file (css, js, images) or link your static DNS to main directory.
Scope
Using this patch to encrease performance:
- http://developer.yahoo.com/performance/rules.html#split
- http://yuiblog.com/blog/2007/04/11/performance-research-part-4/
TO-DO
Static domain are random from aviable url mirror, and is not the best because user must download the same file different time if url mirror change into different page, but if use only two or tree url mirror it work fine.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| static_css_js.patch | 5.04 KB | Ignored: Check issue status. | None | None |
Comments
#1
Just pointing out other approaches to this for your review, and possibly refine your patch based on what you read.
http://drupal.org/project/cdn
http://tag1consulting.com/patches/cdn
#2
@kbahey:
this is a just consideration, but CDN is a "BIG" feature, this is so small, I try to add some correction (use JS and CSS specification) after some day.
tks for reply, i start to study CDN module, it's very intresting!!!
#3
Moving feature request to 7.x.
While this feature request is small, I don't think it is core appropriate for the majority of sites out there. This seems much like a contrib appropriate feature. Plus this would be even easier with the proposed hook_css_alter and already implemented hook_js_alter.