Browser application cache
-
wrote on 5 Mar 2019, 18:17 last edited by
Hello All,
Currently we are using lighttpd 1.4.32 version in our Application. We see that elements in the page[ images] are getting updated one after the other. Our application uses multiple images on a page, causing a sluggish performance. To improve we wanted to use browser application cache method- From Qt, offlineApplicationCache is enabled and path is also set.
- application cache file is referred in the html. This cache file list all the URL of the images that needs to be cached.
3)HTML page refers to this application cache in manifest attribute.
Problem: - We see that application cache status raises "progress" event, but does not raise "cached" event. Does it mean the files are not cached? No "Error" event is also raised.
- Everytime the page loads, it downloads all the contents listed in application cache and not from cache. We see in logs that it sends request to server to download all the image files.
- In our HTML, images to download is set as an background-image attribute. Will this method help to download the image files from application cache instead of server when the server is online and network connection is also good?
Request your help,
Thanks, -
wrote on 5 Mar 2019, 19:14 last edited by
Did you try your application in other browsers?
-
wrote on 6 Mar 2019, 15:35 last edited by
No. Not yet.
Any directions will really help
Thanks -
wrote on 6 Mar 2019, 15:39 last edited by
I have no experience with AppCache, but it should work. I guess you are have an error somewhere, perhaps in cache manifest
-
wrote on 7 Mar 2019, 03:44 last edited by
Me either . Is any other method where images can be cached ? We have lot of images on page which is giving performance issue
Few questions:
- We have autoloadimage set. Is it possible to intercept the http response and store them locally?
- What are the other techniques in qt that can help ?
Thanks,
Radha -
Me either . Is any other method where images can be cached ? We have lot of images on page which is giving performance issue
Few questions:
- We have autoloadimage set. Is it possible to intercept the http response and store them locally?
- What are the other techniques in qt that can help ?
Thanks,
Radhawrote on 7 Mar 2019, 09:48 last edited byIs it possible to intercept the http response and store them locally?
You can replace QNetworkAccessManager instance of QWebPage with object of your own subclass and intercept any requests
What are the other techniques in qt that can help ?
You can use standard HTTP caching, e.g. via installing QNetworkDiskCache on QNetworkAccessManager instance of QWebPage. Behavior of cache is controlled by HTTP headers
1/6