Image sprites for website [closed] - html

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Is it better to use image sprites for CSS or use a lot of different image files?
Maybe it is better to use a lot of different images rather than one sprite or vice versa?

As typical website contains multiple css, java script and image files,causing browser to request multiple http requests. By using sprite it causes less http requests (good for webserver and client/user), and so page will be load fast (good for client/user)

Put everything in 1 sprite, so only 1 request is needed.
EDIT
Actually it's best to put everything that's related on the same sprite, for example a sprite with forum images, a sprite with homepage images, ...
Since you don't need the forum images on the homepage. (-> reduce size of request)

Related

Why do some websites duplicate their background images, to fill the screen size, rather than upload a larger image in the first place? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
For the past few days, I have been looking at the various ways websites upload background images to their website via CSS.
When it comes to images which can be duplicated endlessly, such as plain stripes, I have noticed that some websites upload a small 'sample' of the image and then duplicate it with a CSS input such as background-repeat: repeat-x; rather than uploading a larger version which scales according to screen size.
Is this, primarily, a page load speed optimisation exercise, or is there another reason why somebody may wish to do this other than due to the original image being small in the first place?
Is this, primarily, a page load speed optimisation exercise,
Yes.
is there another reason why somebody may wish to do this
A repeating image doesn't have a maximum height or width that using a larger non-repeating image would impose.
This question intrigued me too, I just did a quick Google and from what I found most sites seem to be saying it takes a longer amount of time to download a dimensionally large image than repeat it.
http://smallbusiness.chron.com/making-background-images-load-faster-31826.html

Carousel which gives Preview of html files [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am writing my first Swift iOS app in which I have a list of html files to be loaded on UIWebView I need to have a horizontal slider to preview all the html files(number of files vary depending on the file that has been selected) at the bottom on the UI. I have searched but was unable to get satisfactory response for the same.
I plan to load to load horizontally carousel of UIWebView which will load html file on UIWebView and would be of relative small size of that the user can have feel of preview
Please guide me in how to achieve this task by following best/optimized iOS development practice.
You could definitely take a look at these pods :
iCarousel
MVCarouselCollectionView
SwiftCarousel
I would go with the swift Carousel. Maybe not the most powerful but it seems that it will fit your needs.
You could define your model (what will your carousel show ?)
Use Alamofire/SwiftyJSON to handle web calls and safely populate your data
Use this pod to handle the display with the power and flexibility of collectionviews
Good luck !

HTML & CSS Pre-loader Enquiry [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I saw that many sites have pre-loaders, and saw sites such as http://cssload.net which allow you to make them. But the question is, is it just HTML and CSS or are there scripts behind site pre-loaders that make the site wait until all of the data is loaded?
All advice is greatly appreciated!
actually the loaders that you watch in those pages are just images or Css fnctionalities and doesn't have any script (dark side) behind just the ones that the page give you.
about show or hide the preloader, basically you show the preload until your data is loaded after it, you can use a javascript method to hide the preloader (actually the div tag where is stored).

How to get logo of a page when parsing? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am trying to create a general parser for sites and get relevant information. First thing I would like to be able to do is being able to know what is the logo of the site.
Usually the logo will be an image that will link back to the main page, and might content the word "logo" in its ID.
What would be a good strategy or standards that I could apply in order to find what is the logo of a page when parsing it?
There isn't really a way to make this a generic process. There are no rules about what how the logo of a site will be displayed - so there is no single ID, class, tag or location you can look to. Likewise, images don't "link" to anything, an <a> link might contain an <img> tag, but thats about it.
Short of writing a long, long list of best guesses, there is no way to reliably parse an arbitrary HTML page and get a logo from it.

I'm having some problems with a few images not loading but the rest are [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am working on a site and I am designing a landing page where you click on pictures and it will take you to a product page.
I have just hit a problem that I was asked to put a slider into the page above everything, I haven't yet started that and thought that i would upload the site for now to a test server to make sure everything is running OK.
Most of the page is but there are three images on one section (3/6) that just will not load. I've looked over the coding and cant seem to find any mistakes with the code.
You must provide some of your code referring to the images, then only someone can help you. Anyway there can be an issue that you were not providing the correct path for the image. Also, sometimes it happens issue with writing the format of the image in caps or small letter. It make work with image.gif but not with image.GIF for example. So, look into image property also and find the correct format.