Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-05-2008, 05:28 PM
MrApples MrApples is offline
 
Join Date: Aug 2007
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default About Sprites

I've read about CSS Sprites, a method of website optimization in which images are stitched together in the same image to save HTTP requests, which delivers faster pages.

With that in mind, - In Theory - If all the images on a web page we're stitched together automatically into the same image, and displayed through use of divs and positioning (to only show the part wanted), would that speed up webpages? Would it put more on a graphics processor? Would it slow down the parsing?

I assume it is best suitable for icons and extras, but just in theory.
Reply With Quote
  #2  
Old 06-01-2008, 10:30 PM
sR Craig sR Craig is offline
 
Join Date: Aug 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello MrApples,

You are correct!

Using CSS Sprites can typically go a very long way to helping with the optimization of your website. However, it is critical that some thought, common sense, and logic be put into the creation of your Sprites.

For example, It would do little good to put 20 smilies into one image map when on average, only one or two is used on a page. You could be loading 18-19 times what is necessary...

However, were it would help a create deal would be for things like:
  • The Full WYSIWYG Editor
  • The Quick WYSIWYG Editor
  • Instant Messenger Icons
  • Quote, Multi-Quote, and Quick Reply Buttons
  • Status Icons (EX1 EX2 EX3 EX4)
  • Etc...

The idea is to use image maps for things that you know the user is going to need when they go to xyz page.

When a Sprite is properly created you should find that the total size of the images combined is more than your Sprite. While this is not always the case, in many instances you are even better off increasing total size of the images with your Sprite if it will be reducing enough requests.

So to directly answer your questions:
  1. Does it speed the loading of webpages? --Yes. (There are less connections which must be created [Reduces Server Load], the total size for all images typically drops, and page loads feel Snappy).
  2. Would it put more load on a graphics processor? --No. (It does not put any extra load on the users GPU, as they are simply images which are being downloaded and displayed differently using CSS).
  3. Would it slow down the parsing? --No.

If you stay tuned, I plan to release some Sprites w/ the CSS for things like the WYSIWYG Editor, and a few other things for which most people use the default vBulletin images for. I also intend to write an extensive tutorial which will cover when to use sprites, how to organize them, optimize them, etc...

BTW: When creating a new post on vBulletin.org there are ~30 images downloaded just for the upper part of the text editor. Thats ~30 requests that could be reduced down to just one. In the long run, its small optimizations like that can really make a difference.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:55 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05519 seconds
  • Memory Usage 2,167KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete