Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8295507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:37:21+00:00 2026-06-08T14:37:21+00:00

When implementing a lightbox or image slider, my usual approach is to nest an

  • 0

When implementing a lightbox or image slider, my usual approach is to nest an element containing the slides within a fixed width and height element that has overflow:hidden;, as below.

CSS3 slider diagram

By animating the margins, we can move the slides fluidly through the visible area.

I’ve recently been implementing such a slider that uses full-screen slides and targets Retina display iPads. The slides aren’t images, but rather distinct chunks of HTML, some with high resolution embedded media. The performance on the device is acceptable, but could definitely be improved.

My question is really what factors should I be considering when attempting to optimize the client-side performance of a web app of this kind? For example, I know CSS3 transitions are considered superior as a result of being hardware accelerated.

Are there ways of laying out the DOM that WebKit might find more pleasing?

Is “lazy loading” non-visible pages likely to make a real impact? If so, is it worth actively removing old elements that have already been seen to control the size of the DOM?

Each slide is currently loaded asynchronously onLoad. Would there be any performance implications (besides saving some HTTP requests) to serving up all the HTML to the browser at once?

I’d be very grateful for any tips or tricks you can come up with!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:37:23+00:00Added an answer on June 8, 2026 at 2:37 pm

    OK, there are a few things to bear in mind here.

    1. Avoid repaints. If you can use transforms and transitions, do. Because the browser knows what you are doing, it can avoid repainting when it’s not needed. I wrote this up a few years back: http://css3.bradshawenterprises.com/sliding/, which explains how to do this. A fall back to using jQuery animate is a popular choice. I wrote up a pretty ugly way to do this here: http://css3.bradshawenterprises.com/legacy/, but you can probably think about how to write that in a nicer way now things have moved on a bit. jQuery 1.8 abstracts away vendor prefixes for instance, avoiding much of my ugly code!

    2. Use 3D transforms where possible, you can cheat a little by adding a transform: translate3d(0,0,0); on the moving bit. This forces it into a new layer in Webkit, which can help on some versions of webkit.

    3. Regarding memory usage and DOM objects, use the Timeline Inspector in Chrome or Safari to record yourself using the slider, then check what’s going on. If you have access to iOS 6.0, then you can connect to the device in Safari to use the inspector directly on the device.

    4. https://developer.apple.com/videos/wwdc/2012/?id=601 is a video dealing with this sort of thing, and worth watching. If you can’t access that page, I believe you can get the videos via iTunes U, but maybe that’s just because I’m a developer as well… Either way, the title of the video is “Optimizing Web Content in UIWebViews and Websites on iOS”.

    In short, measure, record, analyse and experiment!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Implementing a custom Dependency Property on a Framework Element object causes my Visual Studio
Implementing a custom membership provider, there are certain properties such as MinRequiredPasswordLength that only
When implementing the Strategy Pattern, where does one put the code that determines which
Im Implementing a video broadcasting website. For that I planned to use silverlight player
While implementing my own IFilter I found that most likely some consumers will require
I came across this lightbox plugin and thought of implementing it in my project.
Implementing a Thread by providing a new class that extends Thread and overriding its
Implementing a web service that uses Transport-level security with WCF over HTTP is pretty
I'm implementing this JQuery Lightbox plugin inside a DataList: http://leandrovieira.com/projects/jquery/lightbox/ I tested this code
I am implementing a shopping cart for my website, using a pseudo-AJAX Lightbox-esque effect.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.