javascript - Why is localStorage not used to store static resources? -


This question logically follows this question:

It is clear that the popular site HTML5 application caching is not used to save static resources because it was designed.

Just & lt; Html & gt; Check for the attribute in the tag, it is not there.

Seeing it further, HTML5 local storage is not being used.

I saw in the case of a test

  • www Google.com
  • www.twitter.com
  • www.facebook .com

    Just go to console and type

      localStorage.   

    And the console should pop up a list of keys.

    None of these sites can save their static data to disk?

    Why this?

    It seems that resources like a waste of resources have not been hit for the network.

    If you click on the reload to expand, the page will download the remaining resources again. You can also see the terms used in the URL path with Google. However for this question I use the conceptual meaning of the word.

    It is clear that site HTML5 application caching is used to save popular static resources. Are not because it was designed.

    The UIA misunderstood which app was designed for caching. The first paragraph of the application cache space is here:

    Despite being able to continue interacting with web applications and documents, even when their network connection is unavailable ??? For example, because they are traveling outside of your ISP coverage area ???? The authors can provide a manifest that lists the files needed for the web application to work offline and that causes the user's browser to maintain a copy of files for offline use.

    Therefore, app caching was designed to allow web app writers to work their apps when a network connection is not available.

    I can not see whether Google, Twitter or Facebook can work without a useful network connection. All those users rely on having a large amount of data on their servers (in the case of Twitter and Facebookâ € ™ s, other users' data). They are naturally useless without a network connection.

    Similarly, is not local storage which may be designed to process page resources (I think you are suggesting that this site is local I can store CSS, Javascript and image files in the format if I am misunderstood.)

    Specify two related mechanisms, HTTP session cookies to store structured data on the client Comes similar to ...

    The first scenario is designed for the user where the user is taking a transaction, but can take out of the same deal with different windows at the same time ... < / P>

    The second storage system, which is spread to many windows, is designed to remain beyond the current season. Specifically, web applications want to store user's megabytes of data, such as the entire user-writer document or the user's mailbox, due to customer reasons for performance reasons ...

    < / Blockquote>

    To use localhourage for CSS, JavaScript and image files, you need to have every Javascript in that page to check for localStorage is needed by the page, then (in some way) to see if there was a new version of the server to check it for grabbing, then the resource was added to the domain of that page (and if it was new it was local Stored in esoys).

    By default there are a lot of code for repeating the caching that web browsers already have. And when your Javascript is checking local storage and server, the page stops rendering. While the browser download is only in CSS and image files, the page can turn on rendering, while doing so.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -