3 ms·
Hi DjangoReinhardt! Good question; I can answer this one... The site uses html5 to pre-render pages to improve the user experience / site performance... Part o
by nedved 13y ago
Hi DjangoReinhardt!
Good question; I can answer this one...
The site uses html5 to pre-render pages to improve the user experience / site performance... Part of this includes storing the query parameters you make (when running a query) in the new HTML5 web-storage.
This allows the webpage to be rendered before the user actually clicks the "submit" button on any of the tools (Making the site load faster it would normally). The query you specify is then pulled out of the HTML5 web-storage (when the pre-rendered page is made visible) and sent to the backend API servers.
Hope this clears this up for you :)
- DjangoReinhardt 13y agoI'm still very much a newbie but your explanation has now left me in a better position than where I was when I first commented. :) A few follow up questions: 1. They could have achieved the same using cookies too, right? How is it different from using cookies? 2. Is it better because quicker? Or is it better because local storage allows a site to store/retrieve more data from the user and thus reducing the need to get it all from the server? 3. What about CORS? How doe sthat factor in? I honestly don't expect you to answer all these questions. you seem knowledgeable about the topic, so posted these questions here. I'd be very glad if you could simply redirect me to a relevant webpage. Thank you for your time and efforts, I appreciate it very much!
- nedved 13y ago1 - There is nothing wrong with "cookies" but html5 web storage has a lot more flexibility when it comes to storing data in the browser.. It also works better with many modern mobile devices (and mobile devices are becoming more and more popular on the web today). 2 - You're correct about #2 - Caching as much data that does not change in the browser (such as images, common requests etc) will often improve the user experience -- especially when on a poor connection such as a 3G mobile phone. 3 - CORS is defined by the w3dt.net servers .. the main w3dt.net site does not allow "cross-origin" sharing to my knowledge but sub domains such as "results.w3dt.net" do allow CORS so that users may embed results into other websites. -- Read here for more info: http://en.wikipedia.org/wiki/Cross-origin_resource_sharing http://en.wikipedia.org/wiki/Cross-origin_resource_sharing Have a great day :)