HTML 5 Manifest has different behavior across multiple browsers - asp.net

I added some settings on my HTML 5 Manifest which resulted perfect behavior on Google Chrome and
Safari on iOS and Safari as a web clip on iOS.
Unfortunately the same code results in abort on loading manifest files in IE and Fire Fox.
Here is the settings we applied:
In server side: IIS 7, Windows Server 2008 R2.
Response: text/cache-manifest , no-cache.
And the text of manifest is :
CACHE MANIFEST
CACHE:
/
/Index.html
/Login.html
/favicon.ico
/Content/Kendo/web/Font/FontAwesome.otf
NETWORK:
*
And here is the result of IE Network profiler for the first file
URL: http://192.168.0.220:1009/
Method:
Result: (Aborted)
Type: text/html
Received: 292 B
Taken: < 1 ms
Initiator: (Pending...)
And here is the response:
Key Value
Response HTTP/1.1 200 OK
Cache-Control no-cache, no-store
Pragma no-cache
Content-Type text/html
Expires -1
Last-Modified Mon, 23 Sep 2013 16:05:06 GMT
Accept-Ranges bytes
ETag "351169ab76b8ce1:0"
Server Microsoft-IIS/7.5
X-Powered-By ASP.NET
Date Mon, 23 Sep 2013 16:32:43 GMT
And this is a error message of html 5 manifest:
Resource doesn’t exist on the server: 'http://192.168.0.220:1009/'.
AppCache Fatal Error
And finally I've these meta tags on Index.html page:
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE" />
<meta http-equiv="EXPIRES" content="0" />
<meta http-equiv="PRAGMA" content="NO-CACHE" />
Any help highly appreciated.

I've found a reason for the problem.
In Request_End in ASP.NET Global.asax we should apply
HttpContext.Current.Response.Cache.SetNoStore();
only for iOS, and chrome is always working, both for updating application and for offline usage.
Note: no-store is needed in web clip and safari of iOS, because of files which are already loaded before updating manifest, else they won't be updated, even when manifest downloads new version of them.
Hope this helps you too.

Related

facebook share tool reports non existing circular redirects in wordpress article

I am seeing circular redirects in the Facebook Sharing tool I cannot explain on a post written in Wordpress:
This is not as Facebook debugger reports "Circular redirect path detected" (301) on certain website : I have the og:url metadata defined in the page
WordPress post: http://tademo.trueanthem.com/evergreen/posting-just-fun/996/ -> You can see is has the right og:url meta: <meta property="og:url" content="http://tademo.trueanthem.com/evergreen/posting-just-fun/996/" /> and also <link rel="canonical" href="http://tademo.trueanthem.com/evergreen/posting-just-fun/996/" />
Facebook Sharing Debugging Tool: https://developers.facebook.com/tools/debug/sharing/?q=http%3A%2F%2Ftademo.trueanthem.com%2Fevergreen%2Fposting-just-fun%2F996%2F
The detected canonical page is chopping the last /996/ from the or:url/link canonical
These are the reported redirects
I run curl to check if there was a redirect, and there is no redirect:
$ curl -IL 'http://tademo.trueanthem.com/evergreen/check-ga-ia/986/'
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 06 Nov 2017 18:15:49 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Keep-Alive: timeout=20
X-Pingback: http://tademo.trueanthem.com/xmlrpc.php
Link: <http://tademo.trueanthem.com/wp-json/>; rel="https://api.w.org/"
Link: <http://tademo.trueanthem.com/?p=986>; rel=shortlink
X-Cacheable: SHORT
Vary: Accept-Encoding,Cookie
Cache-Control: max-age=600, must-revalidate
X-Cache: MISS
X-Pass-Why:
X-Cache-Group: normal
X-Type: default
$
What is going on here?
Well, it looks like the Facebook crawler does not like the 3 digits at the end of the permalink. I removed the 3 digits in the permalink for all posts, and now the Facebook Sharing Tool has no problem.

HTML5 CSS Validation Content-Type Error

Hopefully its just a quick one just ran my my first html validation everything worked exception it keeps telling me no content-type found. I've compared it to other html5 sites and I have no idea what's going on. I'm also getting a MIME error when I try to validate my CSS sheet. I'm pretty sure they're related/
http://validator.w3.org/check?uri=http%3A%2F%2Fnathansachs.com%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices
As the error message says, your server is failing to include a Content-Type header in the HTTP response. This header is mandatory. It has nothing to do with the HTML document itself.
You need to fix your server or server side program that generates your content.
% curl -I http://nathansachs.com/
HTTP/1.1 200 OK
Date: Sat, 11 Jan 2014 09:24:50 GMT
Server: Apache mod_fcgid/2.3.10-dev
Last-Modified: Tue, 07 Jan 2014 20:32:26 GMT
ETag: "bec00cb-11d5-4ef674648e9f0"
Accept-Ranges: bytes
Content-Length: 4565
I'd consider upgrading Apache. You are using an older version of a development branch. That branch has stabilised and on revision 7 now! (i.e. Apache 2.4.7 is out). Use of experimental code might be the cause of your problem.
Possibly related:
Apache2 not sending “Content-Type” in header
Try to add this inside the <head /> section.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
For HTML5:
<meta charset="UTF-8"> <!-- try without quotes as well -->

Transfer-Encoding: chunked not handled by Chrome

I'm running a web application using Tomcat 7. The app is returning everyone's favorite HTTP header, Transfer-Encoding: chunked. When I navigate to the root url with Chrome (and Firefox, fwiw), Chrome only downloads the first 16384 bytes of the resource. The resource is definitely larger than that size. Why is Chrome only fetching the initial chunk? I see this when accessing the resource with curl:
$ curl -i http://localhost:8080
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=9C7D0EE5D26AD7C99551204CE2896422; Path=/; HttpOnly
Content-Type: text/html;charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 03 Dec 2013 23:07:09 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
(I know there are several questions on this topic, but they seem to involve disabling Transfer-Encoding: chunked. I want to know why Chrome isn't handling the situation correctly.)

OpenGraph not working

I made an action "criar" and an object "oferta" on my app. The code it came back for creating an page was:
<head prefix="og: xttp://ogp.me/ns# fb: xttp://ogp.me/ns/fb# testegraph: xttp://ogp.me/ns/fb/testegraph#">
<meta property="fb:app_id" content="186721904779529" />
<meta property="og:type" content="testegraph:oferta" />
<meta property="og:url" content="http://www.vendefacil.net:7979/mkt21manager/Welcome.jsf" />
<meta property="og:title" content="Sample Oferta" />
<meta property="og:image" content="https://s-static.ak.fbcdn.net/images/devsite/attachment_blank.png" />
(i placed the metas with \ instead of < so they could be read)
I tried a direct post to OpenGraph with the following url:
url = "https://graph.facebook.com/me/testegraph:criar?oferta=http://www.vendefacil.net:7979/mkt21manager/OpenGraph/oferta.html&access_token="+vc.getAccesstoken();
The result is:
HTTP/1.1 400 Bad Request [Access-Control-Allow-Origin: *, Cache-Control: no-store, Content-Type: text/javascript; charset=UTF-8, Expires: Sat, 01 Jan 2000 00:00:00 GMT, Pragma: no-cache, WWW-Authenticate: OAuth "Facebook Platform" "invalid_request" "(#3502) Object at URL http://www.vendefacil.net:7979/mkt21manager/OpenGraph/oferta.html has og:type of 'website'. The property 'oferta' requires an object of og:type 'testegraph:oferta'. ", X-FB-Rev: 644018, X-FB-Debug: Kvtoba9EGskocz2wxI7T2iXvfzV8SvjdxNNzuYfSCp8=, Date: Wed, 10 Oct 2012 16:33:15 GMT, Connection: keep-alive, Content-Length: 252]
Seems to be complaining about the provided website not have testegraph:oferta as og:type and i know that is in the given website. So what is wrong?
According to Facebook's Debug Tool your app sends an immediate 302 redirect to
302 https://www.facebook.com/dialog/oauth?client_id=153701288088609&redirect_uri=http://www.vendefacil.net:7979/mkt21manager/Welcome.jsf&scope=email,user_photos,user_location,user_groups,status_update&response_type=code
The crawler follows the redirect, but won't scrape facebook.com URLs so the information about your page can't be updated.
You need to exempt Facebook's crawler from the redirect and serve the correct meta tags

Google Chrome Developer tools - CSS file showing as an image resource

I'm running the beta of Google Chrome (12.0.742.60)
My page displays fine, however for some reason, in the Developer Tools 'Resources' tab, it's CSS file is shown under the 'Images' disclosure triangle instead of 'Stylesheets' (where the typekit.com CSS is as expected.) Grateful for any ideas..
CSS tag:
<link rel="stylesheet" type="text/css" href="/styles/lofkch.css" />
CSS response headers (via 'Web Developer' extension):
Date: Sat, 21 May 2011 18:52:30 GMT
Content-Length: 9218
Last-Modified: Sat, 21 May 2011 18:40:50 GMT
Server: Apache
ETag: "5ff9-2402-4a3cd93cab080"
Content-Type: text/css
Accept-Ranges: bytes
200 OK
Live page - REMOVED - see answer for cause.
Aside: There was an excellent Google IO session on the new features in GDT earlier this month.
What happens if you remove the empty background-image?

Resources