PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
gazj
Worker
Worker


Joined: Apr 28, 2006
Posts: 150
Location: doncaster england

PostPosted: Mon Aug 24, 2009 3:10 pm Reply with quote Back to top

Hey guys well after i loaded up an RN test site to allow me to look into what changes are needed for anything i code to fit into RN i took a look in the header.php of the site root.

Well my suggestion is to save webmasters a fraction of the bandwidth a month and speed up load times that little bit only call files for jquery as they are needed and same for the nukeSEO header includes

for example the original code im speaking of
Code:

   include_once 'includes/jquery/jquery.php';
   include_once 'includes/tabcontent/tabcontent.php';
   include_once 'includes/ajaxtabs/ajaxtabs.php';
   include_once 'includes/custom_files/nukeSEO/nukePIEhdr.php';
   include_once 'includes/custom_files/nukeSEO/nukeFEEDhdr.php';


now for my suggestion
Code:

   if(defined('USE_JQUERY'){   
   include_once 'includes/jquery/jquery.php';
   }
   if(defined('TABBED_CONTENT'){
   include_once 'includes/tabcontent/tabcontent.php';
   }
   if(defined('AJAX_TABS'){
   include_once 'includes/ajaxtabs/ajaxtabs.php';
   }
   if(defined('NUKEPIE'){
   include_once 'includes/custom_files/nukeSEO/nukePIEhdr.php';
   }
   if(defined('NUKE_FEED'){
   include_once 'includes/custom_files/nukeSEO/nukeFEEDhdr.php';
   }
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 5997

PostPosted: Tue Aug 25, 2009 4:56 am Reply with quote Back to top

Hi gazj,

The included files already have logic that controls the inclusion of additional files, but the approach you suggested would prevent even those files from being loaded. I'll look into moving the logic into the eader (or replacing it with calls to a new function in 2.4 for loading JS and CSS that might even be more efficient).
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1252
Location: Texas, USA

PostPosted: Tue Aug 25, 2009 5:10 am Reply with quote Back to top

as far as i can tell those files are used to determine when those aspects should be loaded.... so it's kinda necessary to include them always Smile

including php files uses bandwidth? isnt that all done on the server side?
View user's profile Send private message
eldorado
Involved
Involved


Joined: Sep 10, 2008
Posts: 366
Location: France

PostPosted: Tue Aug 25, 2009 11:35 am Reply with quote Back to top

yes , it's done server side.
View user's profile Send private message Visit poster's website MSN Messenger
gazj
Worker
Worker


Joined: Apr 28, 2006
Posts: 150
Location: doncaster england

PostPosted: Tue Aug 25, 2009 10:32 pm Reply with quote Back to top

i got an other suggestion tonight i have been playing around gzipping my css and for the multiple css includes from my jquery scripts i have adapted the script i use to scan and then include the css to turn it into php gzip it then print the multiple css/php files into one single css file and i am not kidding it works and also speeds up the site no end
View user's profile Send private message Visit poster's website
montego
Former Admin in Good Standing


Joined: Aug 29, 2004
Posts: 9071
Location: Arizona

PostPosted: Thu Aug 27, 2009 6:13 am Reply with quote Back to top

Believe me, CSS and JS compression has been a topic we've discussed internally. It may not be possible for our 2.40.00 release because we're in code freeze right now trying to get it released. However, I think we all agree that tweaks can be made in this area to improve upon bandwidth and speed.
View user's profile Send private message Visit poster's website
gazj
Worker
Worker


Joined: Apr 28, 2006
Posts: 150
Location: doncaster england

PostPosted: Thu Aug 27, 2009 6:25 am Reply with quote Back to top

well when its released ill be sure to grab a copy and fiddle about trying afew tricks and post on here anything i find to work well then its upto you guys what you do with my findings
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 5997

PostPosted: Fri Aug 28, 2009 7:43 am Reply with quote Back to top

We've made some nice structural changes that impact loading JS and CSS into an array, then adding to the HEAD section (first CSS, then JS). The next step (already planned for a future - probably the next after 2.4 - release) is to use php-minify to combine, minify, possibly gzip and cache into 1 CSS and 1 JS. My research on gzip indicates that the benefits are not necessarily assured, especially with a
Only registered users can see links on this board!
Get registered or login to the forums!
.

Also, we're looking into optionally using a
Only registered users can see links on this board!
Get registered or login to the forums!
for jquery.js.

I wanted to include that in this release, but with nukeSEO DH, we just didn't have time to properly test this and felt that the initial benefits of simplifying and standardizing the loading of CSS and JS were enough for one release.

Given your interest in this, I'd be happy to work with you to develop, test and implement this.
View user's profile Send private message
gazj
Worker
Worker


Joined: Apr 28, 2006
Posts: 150
Location: doncaster england

PostPosted: Fri Aug 28, 2009 11:36 am Reply with quote Back to top

im working on an array system to load css and js files from a dir for each the js and css files its basicly an improvment on my javaadder mod im not that clever at arrays well not yet anyways if your still intrested in joining up to try and tackle this then just head over to my site n we can chat on the im chat i use
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 5997

PostPosted: Fri Aug 28, 2009 11:41 am Reply with quote Back to top

Over the weekend, I'll send you an advance copy of what we did for 2.4 so you can see what's coming. In the mean time, what else are you interested in? Smile
View user's profile Send private message
gazj
Worker
Worker


Joined: Apr 28, 2006
Posts: 150
Location: doncaster england

PostPosted: Fri Aug 28, 2009 12:48 pm Reply with quote Back to top

i got the array for js and css in my <head> if you want a look let me know ill send you the files

i use a function to form the array on the selected dir and file type it only selects files with the passed file type in the passed dir

and sure ill take a look at the advanced copy
View user's profile Send private message Visit poster's website
gazj
Worker
Worker


Joined: Apr 28, 2006
Posts: 150
Location: doncaster england

PostPosted: Fri Aug 28, 2009 2:10 pm Reply with quote Back to top

kguse i have made an example of the way i use arrays to include js and css files i wont post the link public get in touch and i will give you the link to the files

the code for this is small i counted the lines its 26 lines of code im guessing it can be made to be more advanced and maybe more functional but for what i want it for it does the job
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum