0

I'm trying to get HTML5 offline storage working in a basic way. this is my html file

<html manifest="12thPayment.appcache" lang="en" ng-app="mainApp">

this is the 12thPayment.appcache file

CACHE MANIFEST


    https://cdnjs.cloudflare.com/ajax/libs/SVG-Morpheus/0.1.8/svg-morpheus.js  
    https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.8/angular-ui-router.min.js 

    PAYMENTS.html
    ../../js/jquery-2.1.4.min.js
    ../../bower_components/angular/angular.min.js 
    ../../bower_components/angular-animate/angular-animate.js 
    ../../bower_components/angular-aria/angular-aria.js 
    ../../bower_components/angular-material/angular-material.js 
    ../../uimicrokernel/uimicrokernel.js 
    ../../js/directivelibrary.js 
    ../../js/12thdirective.js 
    js/controllers/paymentModule.js 
    js/controllers/configPayment.js 
    js/controllers/paymentService.js 
    js/controllers/paymentAdd.js 
    js/controllers/paymentUpload.js 
    js/controllers/paymentView.js 
    js/controllers/paymentSingleView.js 


    NETWORK:
    *

when i run the file online chrome console says manifest file is created but in the offline it does't work. do i need to add the text/cache-manifest. then where do i need to add it

1 Answers1

0

To enable AppCache on Apache server, add the following to .htaccess:

AddType text/cache-manifest .appcache
shalini
  • 1,291
  • 11
  • 13
  • do i need to create new .htaccess file –  Jan 21 '16 at 10:21
  • if you already have .htaccess file then add this line else create new one – shalini Jan 21 '16 at 10:36
  • i added that line to C:\wamp\.htaccess file but still does't work –  Jan 21 '16 at 10:40
  • try to add htaccess file in root directory of application – shalini Jan 21 '16 at 10:41
  • still not working. i put htaccess file inside C:\wamp\www\fullapps folder and this is my index.html and 12thPayment.txt file path C:\wamp\www\fullapps\12thdoorApps\PAYMENTS\index.html –  Jan 21 '16 at 10:53
  • 12thPayment.txt file?? .txt extension --> is it your appcache file – shalini Jan 21 '16 at 11:22
  • it is the 12thPayment.appcache. i change it to txt file, is it wrong –  Jan 21 '16 at 11:42
  • it should not be a text file . Refer : http://www.sitepoint.com/common-pitfalls-avoid-using-html5-application-cache/ – shalini Jan 21 '16 at 11:59