The Stack Overflow podcast is back! Listen to an interview with our new CEO.
25

CloudFlare describes Rocket Loader like this... Rocket Loader is a general-purpose asynchronous JavaScript loader coupled with a lightweight virtual browser which can safely run any JavaScript code after window.onload. Rocket Loader does a bunch of things: It ensures that all the scripts on your page will not block the content of your ...


13

Sure. Obviously, it would be better to use CSS alone but if you can't, use what you have. Do as much as you can with CSS and use JS as needed. Not sure why you can't change the existing CSS but you can add a style sheet with JS. (function() { //create a new element var newStyle = document.createElement("link"); //set the required attribute for a ...


12

Nice question, here are some guides for doing that on that level. 1. CRAWL YOUR SITE When you redesign your website, there’s a good chance that URLs will change. If URLs change, you absolutely have to inform the engines where those older URLs have moved to. If you don’t, you can destroy your SEO power. All of the equity those old URLs have built up can ...


11

The CDN should be used for all static files (.css/.js/images). Sometimes however javascript or css files can have dynamic aspect to them such as that it would include a unique user string or something of that sort. In this situation the CDN server would have to contact the origin server on every request which would defeat the purpose. If your CSS and ...


8

You have no control over them because they are hosted by another provider. And honestly speaking you should not worry about them, it's up to Google, Facebook, etc to handle the caching accordingly to their need. You could potentially proxy the URLs or download the files locally, but I don't encourage you to follow that route. In fact, you may potentially ...


7

Your assertion that you are better off with one, bigger CSS file is correct. It will likely be only a few KB when gzipped, and should be cached, so not a huge overhead. There are a few things worth checking though. If some CSS is only ever used on one page, it may be better in that case to put the CSS on the page, in some style tags. (Note: this can make ...


7

Well its not your site, its China's internet service layout, which has to jump through hoops to get even get to US DNS Servers. Furthermore, I don't know how 'free' the Internet surfing is there, meaning if it's being monitored by the government, which would undoubtedly further slow its response times. Many factors can be attributed to your site being slow ...


6

This wasn't possible when you asked the question. This is now possible with PageRules. Note: You want to exclude the admin section of your site with a PageRule as well. If you do cache everything and the admin section is included, you will likely see some sort of looping error.


6

For MacOSX ImageOptim optimizes the images. Internally it uses the same tools used by google page speed. http://imageoptim.com


6

I would certainly recommend caching the tweets in your database or a plain text file. As soon as you start getting a lot of traffic you will be creating many hits to the Twitter API and going over their limit. And since you're not tweeting every 30 seconds day and night (I hope!) you could just end up fetching the same thing over and over. In terms of ...


6

No, it's not true. Why should it? How does that improve the content or its relevancy?


6

the other 4 are only used for a word or two Is that a literal statement? If so why are you bothering to embed these fonts at all, subsets or not? You shouldn't even be optimizing in this case, just removing. Make images of the text you need and use your favorite text-replacement technique. You're adding HTTP requests and download time to your site for the ...


6

Based on your reference to the ImageMagick convert method and quality parameter, it appears you're working with JPEG images. If that's the case, the EXIF information for JPEG images does not have a standard compression level tag. However, ImageMagick appears to be able to obtain this information from the image's quantization tables using the identify ...


5

since you asked just out of curiosity, I wanted to comment on something . you wrote that loading will take "few MS." well - this is not ALWAYS true. Depending on your target users - sometimes it can take up to 3 min !!! For example, I am right now in CHINA , which , as you know, BLOCKS twitter, facebook, youtube etc. the result : your page will have to wait ...


5

If you're using the Google Page Speed extension for Firefox, then a copy of the optimized images (as well as JavaScript and CSS files) are put in a temporary folder. http://code.google.com/speed/page-speed/docs/using_firefox.html#advanced You can then take these out, cleanup the file names, and reuse them. Download Google Page Speed extension for Firefox


5

You could try http://www.smushit.com/ysmush.it/ Click "Uploader" and select all images that needs to be "smushed". Your files will be uploaded to their server, become optimized without quality loss, and you will then be able to download all images in a zip file.


5

Are you using a CMS? Many of them have plugins that will let you reference multiple CSS/JS files in your template or theme setup, but then automatically combine and minify them for you on render(WordPress; I think Drupal does this in core now with an option). Sometimes the function is built into a more general caching plugin. In Movable Type, I have CSS and ...


5

Recently i stumbled upon an excellent article about CSS3 Gradient Buttons, and that gave me the kick to change to pure CSS instead of background images. The same style applies to different width's and height's of buttons and even adapt to the used font size. It can also be used on buttons as well as links and other elements. I found it to be much easier to ...


5

I think this is a shortcoming of the speedtest tool that you're using, that it doesn't look at the whole site and see which CSS is never used at all. If you can find a tool that does, let us know! I think you are much better off just creating one big file that can be cached. Yes, that makes sense, unless there's a set of pages that need an extra bit of ...


5

Please note: I am answering based on what you've described above only (which, while descriptive, isn't the same as analysing the source(s)). To your questions above: From Google Page Speed's own FAQ: Some of the suggestions differ from the Page Speed browser extensions. Why? Page Speed Online uses a different rendering engine and user agent, which may ...


5

I don't think you're really getting the full picture with those figures. Sites optimized for "free videos" will turn up for users searching for freevideos. Sites optimized for "freevideos" are much less likely to turn up in the results for free videos. You can easily use natural synonyms for "free videos" (e.g. free movies, cost-free videos, public videos, ...


5

Adding the height and width attributes to your IMG SRC HTML tag allows the browser to know how much space to leave for an image. Without these values, the browser gives an image no space until the image is loaded, which means anything surrounding the image is adjusted after the image has loaded. http://www.computerhope.com/issues/ch001158.htm


5

In addition to post-launch actions, I don't think you should completely ignore what's already there. You're speaking in future tense, so I presume the new site isn't ready yet; use that to your advantage and do a bit of tidying before you even make the switch. If you have pages that will have a replacement (to which you'll want a 301 redirect) then take a ...


5

I don't think the modern search engines care about "older" phone compatibility. If the site is mobile-friendly in modern terms, the spiders will detect that and search engines that report it, will. I suppose you could waste your meta description and/or the opening sentence of text on the site to declare that you are backwards compatible with Nokia flip ...


5

This is a design limitation: The file size must be between 1,000 and 10,000,000 bytes. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html Compressing files is resource-intensive, so the designers of CloudFront placed an upper bound on the size of files that CloudFront will spend resources compressing on-...


4

If you don't have access to the server you won't be able to control caching. That is probably the most important aspect of optimizing the loading time of images and just leaves you with making sure your images are as small as they can be while still looking good. The key to this is choosing the right format for your images and then using the proper ...


4

IMO you should not create a specific class just for text-shadow. That's like adding presentation back into the document. text-shadow should be added to those elements (or predefined classes) that require it. So, of your two options, #2 would be my recommendation, although I would have said you should only be adding it to a subset of predefined classes. And ...


4

Ideally, the Content-type should be specified in HTTP headers (and the text/html part almost certainly is). Failing that, the declaration must be within the first 1024 bytes (usually 1024 characters) of the document. The best way to ensure this is putting it right after the <head> tag. If you are using HTML5 you can simply use <meta charset="utf-8"&...


4

This heavily depends on the target of the audience. For developers, I would offer a Login via Github. For all other matters, having a sign in via Facebook AND Twitter would not hurt. What my company tough observed was, that even tough we are offering the login via Twitter and Facebook, 95% of the Users just sign in via a regular new account.


Only top voted, non community-wiki answers of a minimum length are eligible