हम हो रही निम्न दो फ़ाइलें के लिए 404 के रख रखें:हो रही 404 सेब के स्पर्श icon.png के लिए के
/apple-touch-icon-precomposed.png: 685 Time(s)
/apple-touch-icon.png: 523 Time(s)
मैं इस 404 के लिए दोषी के लिए अपने मोबाइल वेबसाइट संग्रह परिशोध गया है, और कोई मेरे कोड में रखें जो apple-touch-icon.png
पर निर्देशित कर रहा है।
उदात्त पाठ 2 में एक Find in folder...
प्रदर्शन प्रदान करता है शून्य परिणाम apple-touch-icon
के लिए:
Searching 100 files for "apple-touch-icon"
0 matches across 0 files
हम webapps के लिए एप्पल मेटा टैग का उपयोग कर रहे हैं:
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
इन मेटा टैग का
विल उपयोग एक iPhone का कारण डिफ़ॉल्ट रूप से apple-touch-icon
खोजने के लिए? हम एक आइकन नहीं दे रहे हैं, लेकिन क्या हम होना चाहिए? हम वास्तव में इस 404 को हटाना चाहते हैं।
ब्राउज़िंग ऐप्पल के Developer Documentation ने कोई संकेत नहीं दिया जो मेरे सिद्धांत को मजबूत करता है।
प्लॉट की परवाह किए बिना, यह पता चला कि यह आईओएस और एंड्रॉइड पर हो रहा है जब प्लॉट मोटा हो जाता है। फ़ायरफ़ॉक्स, सफारी, & क्रोम सभी इस apple-touch-icon
को खोजने का प्रयास कर रहे हैं।
मैंने अपने वेब ऐप के लिए स्टार्टर के रूप में HTML5 मोबाइल बॉयलरप्लेट का उपयोग किया, जिसमें helper.js
नामक फ़ाइल है।
/**
* iOS Startup Image helper
*/
MBP.startupImage = function() {
var portrait;
var landscape;
var pixelRatio;
var head;
var link1;
var link2;
pixelRatio = window.devicePixelRatio;
head = document.getElementsByTagName('head')[0];
if (navigator.platform === 'iPad') {
portrait = pixelRatio === 2 ? 'img/startup/startup-tablet-portrait-retina.png' : 'img/startup/startup-tablet-portrait.png';
landscape = pixelRatio === 2 ? 'img/startup/startup-tablet-landscape-retina.png' : 'img/startup/startup-tablet-landscape.png';
link1 = document.createElement('link');
link1.setAttribute('rel', 'apple-touch-startup-image');
link1.setAttribute('media', 'screen and (orientation: portrait)');
link1.setAttribute('href', portrait);
head.appendChild(link1);
link2 = document.createElement('link');
link2.setAttribute('rel', 'apple-touch-startup-image');
link2.setAttribute('media', 'screen and (orientation: landscape)');
link2.setAttribute('href', landscape);
head.appendChild(link2);
} else {
portrait = pixelRatio === 2 ? "img/startup/startup-retina.png" : "img/startup/startup.png";
portrait = screen.height === 568 ? "img/startup/startup-retina-4in.png" : portrait;
link1 = document.createElement('link');
link1.setAttribute('rel', 'apple-touch-startup-image');
link1.setAttribute('href', portrait);
head.appendChild(link1);
}
//hack to fix letterboxed full screen web apps on 4" iPhone/iPod
if ((navigator.platform === 'iPhone' || 'iPod') && (screen.height === 568)) {
if (MBP.viewportmeta) {
MBP.viewportmeta.content = MBP.viewportmeta.content
.replace(/\bwidth\s*=\s*320\b/, 'width=320.1')
.replace(/\bwidth\s*=\s*device-width\b/, '');
}
}
};
इस हटाने के बाद, हम अभी भी 404 के मिलती है: helper.js
इसके अंदर इस समारोह जो मैं अपने कोड से हटा दिया है। मैं फंस गया हूँ कोई भी मदद बहुत ही सराहनीय होगी।
क्रोम iOS पर भी यह लायेगा क्योंकि हम आईओएस वेबव्यू जो सफारी की [क्यों मैं सेब के लिए त्रुटि हो रही है ब्राउज़र – Kinlan
संभावित डुप्लिकेट बनाने के लिए उपयोग करता है का उपयोग करें -टच-आइकन-precomposed.png] (http://stackoverflow.com/questions/12480497/why-am-i-getting-error-for-apple-touch-icon-precomposed-png) –