Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.3 RN Feedback/Suggestions
Author Message
gazj
Worker
Worker



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

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

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: 6432

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

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).

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



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

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

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 Visit poster's website
eldorado
Involved
Involved



Joined: Sep 10, 2008
Posts: 424
Location: France,Translator

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

yes , it's done server side.

_________________
United-holy-dragons.net (My RN site)- Rejekz(cod4 clan) - gamerslounge 
View user's profile Send private message Visit poster's website MSN Messenger
gazj







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

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
 
montego
Site Admin



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

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

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.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
gazj







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

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
 
kguske







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

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 multitude of browser versions.

Also, we're looking into optionally using a CDN 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.
 
gazj







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

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
 
kguske







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

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
 
gazj







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

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
 
gazj







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

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
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.3 RN Feedback/Suggestions

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©