Plogger Support Forum - JavaScripts in Plogger's front end Thu, 28 Mar 2024 10:40:01 +0000 http://www.plogger.org/forum/ Lussumo Vanilla 1.1.10 JavaScripts in Plogger's front end http://www.plogger.org/forum/comments.php?DiscussionID=2577&Focus=10194#Comment_10194 http://www.plogger.org/forum/comments.php?DiscussionID=2577&Focus=10194#Comment_10194 Thu, 19 Mar 2009 14:19:44 +0000 dime
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.]]>
JavaScripts in Plogger's front end http://www.plogger.org/forum/comments.php?DiscussionID=2577&Focus=10195#Comment_10195 http://www.plogger.org/forum/comments.php?DiscussionID=2577&Focus=10195#Comment_10195 Thu, 19 Mar 2009 14:36:10 +0000 kimparsell
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?]]>
JavaScripts in Plogger's front end http://www.plogger.org/forum/comments.php?DiscussionID=2577&Focus=10200#Comment_10200 http://www.plogger.org/forum/comments.php?DiscussionID=2577&Focus=10200#Comment_10200 Thu, 19 Mar 2009 18:09:30 +0000 dime
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)]]>
JavaScripts in Plogger's front end http://www.plogger.org/forum/comments.php?DiscussionID=2577&Focus=10205#Comment_10205 http://www.plogger.org/forum/comments.php?DiscussionID=2577&Focus=10205#Comment_10205 Thu, 19 Mar 2009 20:26:26 +0000 sidtheduck
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.]]>
JavaScripts in Plogger's front end http://www.plogger.org/forum/comments.php?DiscussionID=2577&Focus=10224#Comment_10224 http://www.plogger.org/forum/comments.php?DiscussionID=2577&Focus=10224#Comment_10224 Tue, 24 Mar 2009 19:47:42 +0000 dime 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.]]>
JavaScripts in Plogger's front end http://www.plogger.org/forum/comments.php?DiscussionID=2577&Focus=10245#Comment_10245 http://www.plogger.org/forum/comments.php?DiscussionID=2577&Focus=10245#Comment_10245 Tue, 31 Mar 2009 09:26:18 +0000 kimparsell 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]]>