Results 1 to 6 of 6

Thread: dynamic resource server script (php): feedback wanted

  1. #1
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 517 Times in 503 Posts
    Blog Entries
    5

    Default dynamic resource server script (php): feedback wanted

    Hi everyone,

    I'm looking for feedback on a project: https://github.com/customanything/LDRS

    Typically, a webpage will be linked to several resources, such as javascript and stylesheets, which all need to be requested by the browser before the page is "complete."

    The sheer number of HTTP requests is usually a bigger "bottleneck" than the total size of the downloaded resources. Because of this, combining resources into a single file is considered good practice - but an individual webpage might not actually use all of it.

    LDRS (Lightweight Dynamic Resource Server) allows webpage resources to be served via a single HTTP request. This allows your webpage/application to avoid the overhead of extra HTTP requests, but still retrieve only those resources that are actually needed.

    Thanks in advance. Comments and questions are encouraged, either here or by email.

    LDRS at custom-anything dot com

    p.s. this is actually a part of a much larger project that I'm working on, but this is ready now and the rest isn't

  2. #2
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    594
    Thanks
    43
    Thanked 28 Times in 28 Posts

    Default

    I am not quite sure what you are asking for in regards of comments.

    It sounds to me that what you are describing could save time and "work" by the server as a page(s) are requested.

    My thoughts are what exactly would be the results for the average web page?

    faster loading time?
    Thanks,

    Bud

  3. #3
    Join Date
    Mar 2011
    Location
    N 11 19' 0.0012 E 142 15' 0
    Posts
    1,519
    Thanks
    41
    Thanked 89 Times in 88 Posts
    Blog Entries
    3

    Default

    Also, is it worth it?
    How many different resources do you need before this actually makes a noteable change?
    Looks like an interesting development, I'll defineatly have to try it...
    Last edited by keyboard; 04-29-2012 at 12:51 AM. Reason: Spelling - what spelling???

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 517 Times in 503 Posts
    Blog Entries
    5

    Default

    hi Bud,

    regarding "comments":

    I'm looking for broad feedback. It would be great to have a variety of people try using this, and let me know what they liked, what problems they encountered --anything, from start to finish.

    -----------------------------------

    some context to the issue is here.

    Basically, if you have a lot of resources attached to a page, your browser needs to request each of them separately, which adds more time to the process. A typical solution is to combine all of a site's resources (all CSS, all javascript) into single files, so only one file needs to be requested. The disadvantage with this approach is that a particular page probably doesn't need all of them.

    Two main objectives for this script:

    1. Combine resources into fewer HTTP requests, while minimizing total file size by excluding unneeded items.

    2. More importantly, provide a CMS with an easy way to dynamically specify which resources are needed in any particular instance.

    For example, the framework that I'm developing alongside this script has a method called addResource() that the system (or add-ons) can use to specify a resource that they need, which would be added to the request.

    Site-wide resources would still go in "global.css" or "global.js" files, but page-specific resources would be written (and then cached) as needed, automatically.

    Edit: @keyboard:

    You're right, if you only have a few resources for a page, you could easily do what this script does on your own.

    As a tool for a CMS, where content is generated on-the-fly depending on the request, I'm hoping this would work well to help manage everything.

    I've used earlier versions of this on several projects in the past, and I'm happy with how it helps keep things straight: no missing, extra, or duplicate resources.
    (Actually, I should add a check in this script to prevent reading the same resource twice...)

    Last edited by traq; 04-29-2012 at 01:19 AM.

  5. #5
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    594
    Thanks
    43
    Thanked 28 Times in 28 Posts

    Default

    Wow,this is so far over my head that I don't know what to say.

    I don't understand anything you said in the post before this on nor do I have any idea what that link took me to.

    But I do have a web page I have been working on that is huge in size(for me anyway.)It is 49.5kb as of now and may grow even more.

    It uses rss feeds,javascript and css-some of which are good sized too.

    If I can be of help some how email me and I will see what I can do.
    Thanks,

    Bud

  6. #6
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 517 Times in 503 Posts
    Blog Entries
    5

    Default

    ...maybe I'll set up a demo page.

    thanks, Bud!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •