SitePoint Sponsor

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 52
  1. #26
    SitePoint Zealot Amenthes's Avatar
    Join Date
    Oct 2006
    Location
    Bucharest, Romania
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm under construction | http://igstan.ro/

  2. #27
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Daniel0 View Post
    One thing that has always been boggling my mind is why they don't move their JS and CSS to external files so it can be cached. They could save a lot of bandwidth...
    Yes, but it would generate one extra request, and more importantly, a request that the browser WAITS for while it loads.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  3. #28
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It doesn't show right in Opera Mini. I noticed it when I first started using Opera Mini.

  4. #29
    SitePoint Evangelist
    Join Date
    May 2006
    Location
    Denmark
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by M. Johansson View Post
    Yes, but it would generate one extra request, and more importantly, a request that the browser WAITS for while it loads.
    Yeah, okay. I suppose it depends on whether you value server load or bandwidth usage highest.

  5. #30
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had also experienced the same.Now i am fully agreed with you.

  6. #31
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,287
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Heh, funny, this was a technique I was thinking about for nation-flag icons... I currently have each individual icon... I couldn't do regular image replacement because the text behind the 15px-wide image would overflow in IE6/7 without extra code and I didn't want overflow: hidden cutting of the text in the case of no images in modern browsers.

    Interesting to know it's a bit funny in OperaMini and Avant. Since those are not even showing up on our radar, I wonder if I can forget about them and try it this way (I'd wondered how I could do this with foreground HTML images).

    Now I have an example to try from. : )

  7. #32
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Daniel0 View Post
    Yeah, okay. I suppose it depends on whether you value server load or bandwidth usage highest.

    I don't think Google cares either way - they have plenty of each. What they care about is percieved load time. If you have a piece of JS in the HEAD, the page rendering will HALT until that js has completed loading, which is quite a long time, since it's an extra request. The browser won't start ANY other download, not even from other domains. This is by design in hte HTTP protocol. Basically, this means that you should put your external scripts at the bottom of the page. However, there might be reasons it's difficult or impossible to do that, and therefore, putting the script in the head is feasiable, especially if it's small. Stylesheets have a similiar problem.

    Check out
    http://developer.yahoo.com/performance/rules.html

    under the sections "Put Scripts at the Bottom" and "Put stylesheets at the top"
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  8. #33
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Daniel0 View Post
    One thing that has always been boggling my mind is why they don't move their JS and CSS to external files so it can be cached. They could save a lot of bandwidth...
    I noticed this too, and I'm inclined to think that Google does everything it can to minimize the number of requests to the server. Everything is also compressed as tight as possible. Google is built for sending as little information is needed to get the page to users.

    I'm of the opinion that while impressive, the techniques Google uses might not be useful or easy to maintain for many people (moreso the part about maintenance than usefulness).

  9. #34
    SitePoint Member
    Join Date
    Aug 2004
    Location
    Washington
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess they have found this technique to be a reasonable savings for their customer base, despite the added headaches of browser-sniffing and the incredible pain that must come with maintaining the little sprite files and associated code.

    I doubt the same would hold true for most of us reading and discussing on this site =)

  10. #35
    SitePoint Enthusiast
    Join Date
    Sep 2003
    Location
    Singapore
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it makes me think whether we will ever have something working like

    <img src='zipfile.zip:001.png' />
    <img src='zipfile.zip:002.png' />
    so on
    <img src='zipfile.zip:120.png' />
    <img src='zipfile.zip:121.png' />

    i made http://mcg.sitesled.com/cv-ooe/bestiary.htm and i had to use a spreadsheet to help generate the css...

  11. #36
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mcg_sg View Post
    it makes me think whether we will ever have something working like

    <img src='zipfile.zip:001.png' />
    <img src='zipfile.zip:002.png' />
    so on
    <img src='zipfile.zip:120.png' />
    <img src='zipfile.zip:121.png' />

    i made http://mcg.sitesled.com/cv-ooe/bestiary.htm and i had to use a spreadsheet to help generate the css...
    Crap, that would be so awesome.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  12. #37
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mcg_sg View Post
    it makes me think whether we will ever have something working like

    <img src='zipfile.zip:001.png' />
    <img src='zipfile.zip:002.png' />
    so on
    <img src='zipfile.zip:120.png' />
    <img src='zipfile.zip:121.png' />

    i made http://mcg.sitesled.com/cv-ooe/bestiary.htm and i had to use a spreadsheet to help generate the css...
    This sounds like quite a security headache - would active content (HTML+script, Java, etc) run from such a zip: URL be able to run cross-domain? It would probably have to be, since so many sites already serve such material from a second domain. But then, if it is executed would it have access to cookies as Java/HTML executed in such a context currently does? I think this would make it too easy to obfuscate or 'hide' harmful code - like GIFAR but more so.

    HTTP 1.1 supports features that can do this sort of thing already - HTTP 1.1 automatically and without you knowing it, manages persistent connections for you. In addition to this, there is the option of "pipelining" which is not often used, which reduces round-trips and can mean many files are downloaded in one go. And, any entity in HTTP may be compressed using an encoding method (most often gzip) that is auto-negotiated between server and user-agent. Also, GIF, JPEG and PNG images will not benefit from any further compression.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  13. #38
    SitePoint Enthusiast v1rgil's Avatar
    Join Date
    Dec 2008
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    does anybody know the difference between loading an image as background and loading as image src? performance or sequence perhaps?

  14. #39
    SitePoint Guru glenngould's Avatar
    Join Date
    Nov 2005
    Posts
    661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    does anybody know the difference between loading an image as background and loading as image src? performance or sequence perhaps?
    It seems background images have a lower priority in the load order.
    Tweep List adds an avatar menu to Twitter (open source)
    Word Stats shows your most used words on Twitter

  15. #40
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep i know this from a long time but really dont know how to do this

  16. #41
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by v1rgil View Post
    does anybody know the difference between loading an image as background and loading as image src? performance or sequence perhaps?
    It has implications for accessibility. A background image cannot have alternate text (ie, that the user sees when they have disabled images).

    Background images are generally not considered to contribute any semantic information to a page. Some user agents will ignore then, including screen readers, and there is no mechanism in HTML to have alternate representations for them, without other elements.

    It is still appropriate to use a background image if omitting this image would not change the meaning of the page. Google, however probably felt it was very important that users with images disabled got that alt attribute read out to them.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  17. #42
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    They do this on Gmail as well, which does use browser sniffing. Here's a few:






  18. #43
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Raffles View Post
    What is up with the drug-induced squares?
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  19. #44
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I Admire your careful watching, how do you find this picture? As i know, google designs websites with many CSS elements, that is no wonder to be shocked.

  20. #45
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by M. Johansson View Post
    What is up with the drug-induced squares?
    Maybe it is for testing purposes, so they can easily see if they are off by 1 pixel or bleeding into an adjacent square.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  21. #46
    Community Advisor ULTiMATE's Avatar
    Join Date
    Aug 2003
    Location
    Bristol, United Kingdom
    Posts
    2,160
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    I'm not too sure about its use in the online world, but using 'tile-sets' like these has always been a popular move amongst Java developers, especially in the development of games. In fact, I'm writing a 2D Java game using one tile-set right now!

  22. #47
    Non-Member
    Join Date
    Jan 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mmj View Post
    Maybe it is for testing purposes, so they can easily see if they are off by 1 pixel or bleeding into an adjacent square.
    Yes it agree, I think indeed.

    ULTiMATE, Well how your successes with a writing 2D Java game, using tile-set? Already what that time has passed, it is very interesting, what can tell?

  23. #48
    SitePoint Enthusiast v1rgil's Avatar
    Join Date
    Dec 2008
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think it's the way browsers download, cache and use images. i know that images specified in img tag are cached and re-used but not sure as to css background image.

  24. #49
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Man, they sure have a lot of bandwith to cope with

  25. #50
    SitePoint Enthusiast v1rgil's Avatar
    Join Date
    Dec 2008
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The way i see it.
    It's all about improving response times to give their users a better experience.
    Saving bandwidth and other resources, i doubt it because they got plenty.

    Information on how browsers handle css background image woud be very helpful.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •