PDA

View Full Version : How to use the loaded library files in application



url
26 Jan 2014, 9:40 PM
Hi All,
In my application index.html page am loadiing some library files and custom files (js and css).
For example <script type="text/javascript" src="myapp/ext/ext-all-debug.js"></script>
I don't want to load the same file again and again rather can used the already loaded file in to memory.

Can i use the HTML% local storage concept for this ? If yes can i have a sample example on it ?

Any help is highly appreciated. Thanks in Advance.


Thanks
Url

Gary Schlosberg
29 Jan 2014, 10:53 AM
I haven't heard of anything like that, but it certainly sounds interesting. I think it will be difficult to get the framework to load that way, but please do post back if you get it figured out.

url
3 Feb 2014, 5:46 AM
Hi All,
I got the solution, we can do that by adding a manifest file to the application. For that we need to add a .apache file where we need to add all the path of the files which i dont want to load it again.
like i have created a file test.apache with content

CACHE MANIFEST
#23-01-2014 v7.0.0
/themes/AdminBase/admin.css
/lib/ext/ux/TinyMCE/css/styles.css
/lib/desktop/resources/css/desktop.css
/lib/ext/ux/RemoteComponent/Ext.ux.Plugin.RemoteComponent.js
/lib/ext/ux/Spinner/Spinner.css
/lib/beautify.js

and we need to add the file path in our <html> of the html file like
<html manifest="test.appcache" xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

In this case the files listed in the file will load only one time and next time onwards it will read from cache which will increase the performance.

Thanks
Url