Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthordime
    • CommentTimeMar 19th 2009 edited
     
    I want to ask what for is dynamycs.js used, except for show/hide details?

    Also, shouldn't we have if function for slideshow.js so that it is loaded only on slideshow pages, not on all pages? This way how now it works, we are wasting bandwidth, servers resources and increase page loading time.
    •  
      CommentAuthorkimparsell
    • CommentTimeMar 19th 2009
     
    dime:

    The file dynamics.js in each theme is used for the following: show/hide details link, to validate the download checkboxes (checked or not checked), and display the comments overlay on thumbnails. The weight of that file is 1.54kb. slideshow.js weighs in at 18.5kb. Total file weight between the two is 20.04kb.

    Both files are loaded when a user hits the gallery the first time, along with your stylesheet and images. From that point on, the user's browser is serving the files up from their local cache (temp files), so bandwidth is only being used when the files are initially loaded, rather than with each page load. How is that wasting bandwidth and server resources, and increasing page load time?
    • CommentAuthordime
    • CommentTimeMar 19th 2009
     
    I didn't said that both files are doing this (because I was not sure for what all is dynamics.js being used), I just said to slideshow.js and I will concentrate on it.

    This file is used only on slideshow pages (am I wrong?) but it is loaded on every. Yes, browser will probably cache it, but no matter on which page user land, this file will be loaded on that first page view.

    But what if webmaster turned off links to slideshows so visitors don't even know about them? Or when visitors don't visit slideshow pages? In those cases they downloaded those files without need, and following this they wasted bandwidth, server resources, and most importantly increased page load of first page, which should use as low as possible number of external files, and it already includes css, background images, thumbs or full pictures, stats and ads files etc. That one http request is really increasing page loading, and imagine if site has 10 000 daily visitors — that's 180 MB of wasted bandwidth.

    This applies to dynamycs.js file too, but it is different with it since it is used on different type of pages (if not all) and it is needed to load on every page type. But this is not case for slideshow.js, since it is needed only slideshow type of pages. Thats why I'm suggesting to add if function so that slideshow.js is loaded only on slideshow pages, when visitor really need it.

    If you don't believe me about what I say, read Yahoo's tips for speeding up website, which is really reliable source since it is by most visited site on the internet (no, Google is not most visited) and to which point thousands of other sites (most rules are described in detail via discuss link).

    (note that I proved many of this things by myself)
    •  
      CommentAuthorsidtheduck
    • CommentTimeMar 19th 2009
     
    dime,

    You can always hack it yourself as well. I've gone ahead and added the code to my local copy and will commit it next time there is something else that needs to go to the codebase (I think this weekend sometime). Anyway, to get slideshow.js to only show up on slideshow.php, open plog-fuctions.php and change the function generate_slideshow_js() to look like this:
    function generate_slideshow_js() {
    global $config;
    $output = '';
    if($GLOBALS['plogger_level'] == 'album' && $GLOBALS['plogger_mode'] == 'slideshow') {
    // output the link to the slideshow javascript
    $output = "\n\t" . '<script type="text/javascript" src="'.$config['gallery_url'].'plog-includes/js/plog-slideshow.js"></script>' . "\n";
    }
    return $output;
    }


    Also, you seem to know your SEO and what you would like to get out of Plogger. You should shoot me an email sometime (sidtheduck SPLAT gmail DOT com) with your ideas or list them on the board (I know you've done some here and there, but it would be nice to have them all in one spot) and we developers can start looking into your ideas as well (or you can create patches of your own code and post them to Trac tickets for use to review and commit). We've even already started working on some of the ideas you had (meta keyword and description tags, etc.) in the current codebase. We're always trying to make Plogger more usable and customizable for users while still keeping it simple to use.
    • CommentAuthordime
    • CommentTimeMar 24th 2009
     
    Posted By: sidtheduck
    You can always hack it yourself as well.


    Yes, but I wanted that to be included in release.



    Posted By: sidtheduckAlso, you seem to know your SEO and what you would like to get out of Plogger. You should shoot me an email sometime (sidtheduck SPLAT gmail DOT com) with your ideas or list them on the board (I know you've done some here and there, but it would be nice to have them all in one spot) and we developers can start looking into your ideas as well (or you can create patches of your own code and post them to Trac tickets for use to review and commit). We've even already started working on some of the ideas you had (meta keyword and description tags, etc.) in the current codebase. We're always trying to make Plogger more usable and customizable for users while still keeping it simple to use.


    I have MANY ideas and that's because I didn't write them here, because it'll take a lot of time to write them in one piece. I'll do my best to write them in near future.
    •  
      CommentAuthorkimparsell
    • CommentTimeMar 31st 2009
     
    Posted By: dime
    Posted By: sidtheduck
    You can always hack it yourself as well.


    Yes, but I wanted that to be included in release.

    dime: The fix for including the slideshow.js file was included in the last commit that sidtheduck did (as he said it would be). See the first of changes for plog-functions.php: rev594