I want to add the manifest attribute during run-time, so the I can control when the Appcache will be downloaded.
Ex: When a user is logged into the application properly,
<html>
// page content
</html>
changes into:
<html manifest="myapp.manifest">
// page content
</html>
Is there anyway I can achieve this using javascript, jquery or anything? What I want to is to control when the Appcache will be downloaded conditionally.(I have already read about having another html inside an iFrame.)
According to the specification, changing the manifest
attribute after the document loaded has no effect.
You can still access the html
element and change the attribute value, via document.documentElement
:
document.documentElement.setAttribute('manifest', 'myapp.manifest');
It just won't do anything.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With