JavaScript classic written interview knowledge collection

1.get request parameter passing length errors

We often get to say there is a request to limit the size parameters, and post the request parameter size is unlimited

Indeed http protocol requests never get provisions and post length limit how much to limit the parameters of the request is to get to the source browsers or web servers, browsers or web servers limit the length of url

http protocol does not provide for get and post length limit

The maximum length of get displayed because the browser and the web server limits the length of the url

Different browsers and web servers limit the maximum length is not the same

To support ie, a maximum length of 2083byte, if supported chrome, the maximum length of 8182byte

2. Supplementary get and post requests differences in terms of cache

get request process to find similar users get the data, you can not always connect with the database, you can use the cache.

Different post, post generally do modification and deletion of work, it is necessary to interact with the database, so you can not use the cache.

So get request more suited to the request caching.

3. Closure

Closure is the function of the other function can read internal variables, or subroutine call out, the scope of the parent function where subfunction is not released.

Published 158 original articles · won praise 44 · views 30000 +

Guess you like

Origin blog.csdn.net/qq_43277404/article/details/103376156