Nov 25, 2009

Fake An Ajax Loading Sequence - use a background GIF to do it

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > How-To's and Tutorials > Websites and Web Designing

Fake An Ajax Loading Sequence - use a background GIF to do it

jlhaslip
I wrote a Tutorial about a Faux Ajax Loading technique and planted it over on the Trap17 sister site.
Actually, most of the information can be gleaned from the direct link.

Tutorial: http://www.trap17.com/forums/faux-ajax-loa...nly-t52030.html

Thought the Astahost crew needed to see it, too. Enjoy.

Comment/Reply (w/o sign-up)

TavoxPeru
QUOTE(jlhaslip @ Oct 4 2007, 08:24 PM) *
I wrote a Tutorial about a Faux Ajax Loading technique and planted it over on the Trap17 sister site.
Actually, most of the information can be gleaned from the direct link.

Tutorial: http://www.trap17.com/forums/faux-ajax-loa...nly-t52030.html

Thought the Astahost crew needed to see it, too. Enjoy.

Interesting technique congrats, but i just view it with Internet Explorer 6 and only the first time works as you say because the background image is cached by the browser.

Best regards,

Comment/Reply (w/o sign-up)

Sten
thats a nice technique, never wouldve thought of anything like that, lol

and although it sed it would take a long time, i still hardly got to see the loading picture cos it only took like a second to load.



Comment/Reply (w/o sign-up)

vizskywalker
It's an interesting technique, but, thinking from both a server side and client side perspective, I'm not sure it's a very useful one that would ever see high usage. It might, because I haven't looked at the comparative sizes of the javascript used for AJAX versus the gif image size, but since javascript is plain text, I imagine it would be smaller. Here's my short, quick (and possibly incorrect) analysis:

Server Side:
So, the animated gif needs to be stored on the server, this takes up extra space. Although it is not much extra space, imagine having several different versions of these images, or a complex image, both of which can more or less be done via css tricks and javascript tricks and AJAX without requiring the overhead of the image storage on the server. And since you need a specially sized image for each image the gif is going to serve as a loading screen for, instead of being able to dynamically perform the function with javascript, the overhead will begin to increase. Unless you make every image the same size. Also, bandwidth issues, the extra image must be sent which takes more bandwidth. Note that both of these issues rely on the assumed fact that the image is larger than the javascript file. Even if it isn't, there is always the possibility that the javascript file is being sent anyway, so it already has header information sent and a request made for it, whereas the image would need another one.

Client Side:
Same bandwidth issue as the server, possibly the same space issue if someone permanently caches everything, but then, it is their own fault. However, the extra load time for the gif, if it is a larger than the comparable javascript, load time goes up, which means the larger image takes even longer to load. A page with several of these images with the background loading gif of different sizes would be a large increase in bandwidth and load time over one dynamic file of javascript.

Just some things to consider. I'm not saying this is bad, in fact, I am quite impressed by it. I'm just saying it may not be a very beneficial replacement for AJAX loading screens. However, its simplicity in setup and design does mean more people will be able to use it easily.

~Viz

 

 

 


Comment/Reply (w/o sign-up)

jlhaslip
Good points, viskywalker, but many folks don't like javascript or don't understand it, or are scared of it, can't use it, disable it, or have it disabled by others beyond their control but can use Html/CSS.

And it isn't simply the javascript file size versus the css and image size which comes into play. Javascript and css get loaded at different times in different sequences which affect page loading, too.
Loading a js file will have a more severe impact on the site loading times, according to everything I have read, whereas the css to run this script is minimal, as is a correctly built background image, which can be a single Image for several Large images per page or site.

I only hack at graphics, but I am sure a photoshop whiz could get an image for this effect down to a minimal file size.

Anyway, hope someone can use the effect, or that it inspires someone to take it beyond where I have it.

biggrin.gif

Comment/Reply (w/o sign-up)

vizskywalker
I'm sure it will. It is interesting what you can do with css. Although, I actually just had a thought which renders part of my argument moot. I forgot that you can resize images using css, so you won't need several images to handle images of different sizes. And your point about people who disable javascript is a valid one. Although, I wonder how many people would prefer not to have a loading screen at all. It is an interesting technique, and I may try using it on my site, or extending it somehow.

~Viz

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : fake, ajax, loading, sequence, background, gif

  1. Ajax
    For Dummies! (12)
  2. Ajax+php+sql=simply Superb!(with Visitor Tracking) :: Section 2 (retrive Values From Database And Dynamic Update!)
    A small tutorial to explain integrating php, ajax and MySQL Database (4)
    Hi all.. This the Section 2 for my previous tutorial about storing values in background using ajax!
    Please have a look at here: Astahost.com/ajax-php-sql-simply-superb-visitor-tracking-t15502.html
    Introduction! We are going to create 2 background script files. One to get values from
    the main page input field and store all values including visitor details ( IP Address, Input Value,
    Visitor Agent etc) to database and the 2nd one for retrieving all values from database and display
    it in the screen! We are going to 2 separate pages first and then going to i....
  3. Css Rollover Menu (with Background)
    bandwidth friendly rollover (0)
    Ive found this code very usefull when it comes to clients who cant afford Flash (and I hate
    JavaScript rollovers as they only work half the time and when you hold the mouse over the button for
    5 seconds) When your done here you should be able to create a menu that looks like the following:
    click here to see what it looks like Step 1: setting up the framework Get the framework in
    there for the script to work , I generally link to my stylesheets externally so I will show you how.
    Now open a simple text editor such as Notepad. set up your page with the following bas....

    1. Looking for fake, ajax, loading, sequence, background, gif

See Also,

*SIMILAR VIDEOS*
Searching Video's for fake, ajax, loading, sequence, background, gif
advertisement



Fake An Ajax Loading Sequence - use a background GIF to do it

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com