Rendering a Second-Visit Experience ASP.NET

The second visit is piece of cake. The user account is already available from a browser cookie,which you get via the ASP.NET membership provider.All the Ajax scripts are already in the browser’s cache. So, you just load existing pages and widgets on the page and render the page to the browser (see Figure ).

On the second visit, the user account, pages, and widgets are already created so the user page loads very fast

On the second visit, the user account, pages, and widgets are already created so the user page loads very fast

Here’s what the web portal does on the second visit:

• Gets user from encrypted browser cookie via theASP.NET membership provider

• Loads user pages and creates tabs for each page

• Finds the current page

• Loads all widgets on the current page

• Allows widgets to load their previous state

• Renders the widgets and scripts

• Delivers the client-side framework (should be cached on browser already)

Because the client-side framework, widget scripts, and extender scripts are already cached on the browser,the duration of a second-time visit is basically the time spent on the server and the time the browser spends initializing scripts.However, in the meantime, the browser cache might expire and the cached JavaScript can get lost.If this happens,the browser will download the scripts again and the user will notice some delay during the next visit.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

ASP.NET Topics