This translation is incomplete. Please help translate this article from English.
ওয়েব এপ ডেভেলপিং এর ক্ষেত্রে পরামর্শ, পদ্ধতি ও কৌশল এর জন্য একটি শ্রেষ্ঠ রিসোর্স -- বিশেষ করে যারা ফায়ারফক্স ওএস লক্ষ্য করে কাজ করছে -- আমাদের চমৎকার ফায়ারফক্স ওএস ও গায়া ডেভেলপার টিম। এ পাতাটি তাদের কিছু ধারণা সমৃদ্ধ। উপভোগ করুন!
ইনস্টল ও আপডেট
যদিও আমার appcache
মেনিফেস্ট রয়েছে তবুও আমার এপ আপডেট হয়না
Please check if you send Cache Headers for your appcache
manifest. If you don't, Gecko will use heuristic caching and will serve it from its cache for a few hours. We recommend that you configure an immediate expiration for your appcache
manifest. The following Apache config will do just that:
AddType text/cache-manifest .appcache ExpiresByType text/cache-manifest "access"
This might be a good idea for your webapp
manifest too:
AddType application/x-web-app-manifest+json .webapp ExpiresByType application/x-web-app-manifest+json "access"
মিডিয়া উপস্থাপনা
Currently, for security reasons, the h.264 decoder on Firefox OS devices is only available to privileged code. Because of that, you can't use the <video>
element to present h.264 content at this time. You can, however, use a Web Activity. Here's a code snippet that can help:
var activity = new MozActivity({ name: "view", data: { type: [ "video/webm", "video/mp4", "video/3gpp", "video/youtube" ], url: "https://example.com/myvideo.mp4" } });
This asks Firefox OS to present the MP4 video at the specified URL. You can include one or more video format types in the type
list to permit.
সমস্যা সমাধান
Whitelist "app:/" protocol with AngularJS
If you have developed a packaged app with AngularJS, you may run into this error message:
The address wasn't understood Firefox doesn't know how to open this address, because the protocol (unsafe) isn't associated with any program.
When you use Angular data binding to generate a URL, Angular will match the URL against its whitelist. If the URL does not match, Angular prefixes the url with "unsafe:" (see the Angular documentation). To make you app work with AngularJS, you can add "app:/"--the protocol FirefoxOS packaged apps use--to Angular's whitelist. In your app's configuration, this is how to whitelist "app:/":
var app = angular.module( 'myApp', [] ).config(['$compileProvider', function($compileProvider) { $compileProvider.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|app):/); } ]);
Or in AngularJS 1.1+
var app = angular.module( 'myApp', [] ).config(['$compileProvider', function($compileProvider) { $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|app):/); } ]);