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

  1. apply patch to file
  2. 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).
  3. 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:

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.

AttachmentSizeStatusTest resultOperations
static_css_js.patch5.04 KBIgnored: Check issue status.NoneNone

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

Version:6.x-dev» 7.x-dev
Status:needs review» needs work

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.

nobody click here