61 things website developers should know

Source: Internet
Author: User

Someone asked on Stack Overflow what do I need to know before developing a website? Unexpectedly, he got a lot of answers. Generally, you need to read everyone's speeches from start to end. However, stack overflow has a very considerate design, which allows you to open a wiki area under the question to allow everyone to edit the best answer. So we have the followingArticle, A total of 61 "website development instructions" in six aspects are summarized ".

I found that this type of summary question is most suitable for this kind of collective intelligence and brainstorming answer method. This is also the first time I think that stack overflow does what Wikipedia cannot do. (No wonder it has recently moved into the top 400 websites in the United States .)

In my impression, such a comprehensive summary article on website development is rare and therefore useful. Let's take a look at how much you have done in 61 cases?

61 things website developers should know

Http://stackoverflow.com/questions/72394

Translator: Ruan Yifeng

1. Interface and user experience)

1.1

Know the implementation of web standards in various browsers to ensure that your site can run normally in the main browser. You must test at least the following engines: gecko (for Firefox), WebKit (for Safari, chrome, and some mobile browsers), and IE (you can use Microsoft's application compatibility VPC images for testing) and opera. At the same time, different operating systems may also affect how browsers present your website.

1.2

In addition to browsers, websites also have other usage methods: mobile phones, screen readers, and search engines. You should know the running status of your website under these circumstances. Mobiforge provides some knowledge about mobile website development.

1.3

Know how to upgrade your website without affecting your use. Generally, you must have a version control system (CVS, subversion, git, and so on) and a data backup mechanism (Backup ).

1.4

Do not let users see unfriendly error prompts.

1.5

Do not directly display the user's email address, or at least do not display it in plain text.

1.6

Set reasonable limits for your website. Once the threshold value is exceeded, the service will automatically stop. (This is also related to website security .)

1.7

Know how to implement progressive enhancement of web pages (progressive enhancement ).

1.8

After a POST request is sent, the user always redirects it to another webpage.

1.9

Do not forget the accessibility of your website ). For us websites, this is sometimes a legal requirement. WAI-ARIA has some good references in this regard.

Ii. Security)

2.1

Read OWASP Development Guide, which provides comprehensive website security guidance.

2.2

Understand SQL injection and its prevention methods.

2.3

Never trust the data submitted by the user (cookies are also submitted by the user end !).

2.4

Do not store users' passwords in plain text. Do not store passwords after hash processing.

2.5

Do not be too confident about your user authentication system. It may be easily cracked, and you are not aware of the vulnerability.

2.6

Learn how to handle credit cards.

2.7

Use SSL/HTTPS on the logon page and other pages that process sensitive information.

2.8

Know how to deal with session hijacking ).

2.9

Avoid cross site scripting (XSS ).

2.9

Avoid cross-origin request forgeries (xsrf ).

2.10

Patch your system to keep up with the latest version.

2.11

Confirm the security of your database connection information.

2.12

Track the latest development of attack technology and the latest security vulnerabilities on your platform.

2.13

Read Google's browser security handbook ).

2.14

Read the web application hackers handbook ).

Iii. Performance)

3.1

Cache is used whenever possible ). Correctly understand and use HTTP caching and HTML5 for offline storage.

3.2

Optimize the image. Do not use a 20kb image file as a recurring webpage background pattern.

3.3

Learn how to use gzip/deflate to compress content (deflate is preferred ).

3.4

Combine multiple style sheet files or script files into one file to reduce the number of HTTP requests of the browser and the size of the web page after gzip compression.

3.5

Browse Yahoo's predictional performance website, which provides a large number of excellent suggestions to improve front-end performance, as well as their yslow tools. Google's page speed is another tool used to analyze Web page performance. Both require the installation of firebug.

3.6

If your webpage uses a large number of small images (such as the toolbar), you should use CSS image sprite to reduce the number of HTTP requests.

3.7

For a large-traffic website, you should consider spreading webpage objects across multiple domain names (split components into SS domains ).

3.8

Static content (such as slice, CSS, JavaScript, and other webpage content unrelated to cookies) should be placed on an independent domain name that does not require cookies. If there is a cookie under the domain name, the client will attach the cookie content to each HTTP request sent to the domain name. A good method here is to use content delivery network (CDN ).

3.9

Minimize the number of HTTP requests required by the browser to complete web page rendering.

3.10

Google's closure compiler can be used to compress JavaScript files, and Yui compressor can also be used.

3.11

Make sure that the favicon. ICO file is in the root directory of the website, because even if the file is not included in the webpage, the browser automatically sends a request to it. If this file does not exist, a large number of 404 errors will occur, consuming the bandwidth of your server.

4. Search Engine Optimization (SEO)

4.1

Use the URL format of "Search Engine Optimization", such as example.com/pages/45-article-title, but not example.com/index.php? Page = 45.

4.2

Do not use hyperlinks such as "Click here", because it wastes a Seo opportunity and reduces the effect of screen reader.

4.3

Create an XML sitemap file. The default location is/sitemap. XML (put in the root directory of the website ).

4.4

When you have multiple URLs pointing to the same contentCodeUse <LINK rel = "canonical".../>.

4.5

Use Google's webmaster tools and Yahoo's site explorer.

4.6

Google Analytics (or open-source access volume analysis tool piwik) was used from the very beginning ).

4.7

Role of Zhidao robots.txt and how search engine spider works.

4.8

Direct access requests from www.example.com to example.com (with 301 moved permanently redirection) or use the opposite approach to prevent Google from using them as two websites and calculating rankings separately.

4.9

A web spider who knows that there are malicious or improper behaviors.

4.10

If your website has non-text content (such as video and audio), you should refer to Google's sitemap extension protocol.

V. Technology)

5.1

Understand the HTTP protocol and concepts such as get, post, sessions, and cookies, including what stateless means.

5.2

Make sure that your XHTML/html and CSS comply with W3C standards so that they can pass the test. This allows your web page to avoid triggering the quirk of the browser and make it work properly on the screen reader and mobile phone.

5.3

Understand how the browser handles JavaScript scripts.

5.4

Understand how JavaScript files, style sheet files, and other resources on the Web page are loaded and run, and how they affect page performance. In some cases, the script file may be placed at the end of the web page.

5.5

Understand how JavaScript sandbox works, especially if you plan to use IFRAME.

5.6

Javascript may not be available or disabled, and Ajax may not always run. Remember, "Do Not Allow script running" (NoScript) is becoming popular for some users. Mobile browsers have different support for scripts, but Google does not run most of the script files when indexing webpages.

5.7

Learn the difference between 301 redirection and 302 redirection (this is also a Seo issue ).

5.8

Learn as much as possible about your deployment platform ).

5.9

Consider using the style sheet reset (reset style sheet ).

5.10

Consider using JavaScript frameworks (such as jquery, mootools, and prototype), so that you do not have to consider the differences between browsers.

6. fix bugs

6.1

UnderstandingProgramStaff 20% of the time is used for coding, and 80% of the time is used for maintenance. Schedule the time according to this point.

6.2

Establish an effective error reporting mechanism.

6.3

Establish some channels or systems so that users can contact you and give you suggestions and criticism.

6.4

Write documents for future maintenance and customer service personnel to explain how the system runs.

6.5

Regular backup! (And make sure these backups are valid .) In addition to the backup mechanism, you must also have a recovery mechanism.

6.6

Use a version control system to store your files, such as subversion or git.

6.7

Don't forget to do unit testing. frameworks like selenium will be useful to you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.