Question 191 – What are Hidden Frames in ASP.Net?
- A hidden frame is a frame with 0 width and height, so that no one can see it.
- You can run programs in there when you need to make a round trip to the server so that your main frame does not refresh.
- To create one, you just use a frameset tag
- A hidden frame is a complete document, e.g. IFRAME, that is not visible.
Question 192 – What are the Benefits of Hidden Frames in ASP.Net?
- Hidden frames allow you to cache more than one data field.
- The ability to cache and access data items stored in different hidden forms.
Question 193 – What are the Limitations of Hidden Frames in ASP.Net?
- Not supported by all browsers
- Stored data is not secured as it is stored on client’s machine in the form of hidden fields.
Question 194 – What is a Cookie in ASP.Net?
- It is a small bit of text that accompanies requests and pages as they go between the server and browser.
- The cookie contains information the Web application can read whenever the user visits the site.
- It provide a useful means in Web applications to store user-specific information.
- Cookies are associated with a Web site, not with a specific page, so the browser and server will exchange cookie information no matter what page the user requests from your site.
- Most browsers support cookies of up to 4096 bytes.
- Most browsers allow only 20 cookies per site, so if you try to store more, the old cookies are discarded.
- Maximum 300 cookies can be stored that will be accepted from all sites combined.
Question 195 – What are the examples of Cookie usage in ASP.Net?
- Cookies are used for all sorts of purposes, all relating to helping the Web site remember you.
- For example, a site conducting a poll might use a cookie simply as a Boolean value to indicate whether your browser has already participated in voting so that you don’t vote twice.
- A site that asks you to log on might use a cookie to tell itself that you’ve already logged on so that you don’t have to keep entering your credentials.
Question 196 – What are the Types of Cookies in ASP.Net?
- Persistent – Means the cookie will be expired as soon as the application is closed
- Non Persistent – Even the application is closed the data will be remained as per the cookie timeout value.
Question 197 – What are the Benefits of Cookies in ASP.Net?
- They are simple to use.
- Light in size, thus occupy less memory.
- Stores server information on client side
- Data need not to be sent back to server.
- Cookies persist for much longer period of time than a session.
Question 198 – What are the Limitations of Cookies in ASP.Net?
- Since they are stored on the client side in plain text, they are not secure.
- Number of cookies that can be stored and their size is limited.
- They don’t work if security level is set too high in browser.
- Some people might just disable cookies on their browsers.
Question 199 – What is the relation between Cookies and Session State?
- By default, ASP.NET uses a non-persistent cookie to store the session state.
- If a user has disabled cookies on the browser, Session state cannot use a cookie to store the session ID and Session state doesn’t work. – No cookie, No Session state.
Question 200 – What is a Cookieless Session in ASP.Net?
You can configure your application to store Session IDs not in a cookie, but in the URLs of pages in your site. By keeping the Session ID in the URL, ASP.NET stores the ID in the browser, in a manner of speaking, and can get it back when the user requests another page. Cookieless sessions can get around the problem of a browser that refuses cookies and allow you to work with Session state.
However, under some limited circumstances, if the user shares the URL with someone else — perhaps to email the URL to a colleague while the user’s session is still active — then both users might end up sharing the same session, with unpredictable results.
Disclaimer – F5debug Interview Questions & Answers Series:
You may recopy extracts from these pages (“the material”) to individual third party websites or to any intranet websites, but only if:
You acknowledge www.f5debug.net as the source of the material. Such acknowledgment should include reference to www.f5debug.net in the copy of the material and should also include “© Karthikeyan Anbarasan, www.f5debug.net “. You inform the third party that these conditions apply to him/her and that he/she must comply with them.