How to define a custom "This browser is not supported" page in Sails.JS - sails.js

When I try to use a Sails.js site in production mode with a Safari 5.1, I'm getting a "This browser is not supported" page with a big Sails.JS logo. What's the proper way to customize this page ? . Also, how can I check what rules are applied to allow or block old browsers from using the site?
The website works as expected with modern browsers ( it even works in IE 11 ).

I found it.
It's defined in the layout of the site that was generated from the template file caviar-layout.js . The layout is in /views/layouts
The Layout File includes the image, rules to block browsers and the custom message.

Related

AMP errors in web master tool

I have implemented AMP successfully for my webpages and google started indexing it, which I came to know via WebMaster tool. I am facing some issues which is present and disappears in short span of time.
Issue logged are:
User authored JavaScript found on page
The pages doesn't contain any script tags except schema.
This error is showing for few pages from 120 pages instead of following same
template. Below is the image link:
Have some more query:
I have observe different amp urls getting redirected to its original page when the same amp url is being used in Web Browser.
Is Google taking care of it or its on us to do the redirection?
I am planning to implement the sign in and share buttons on my web pages which will be using javascript. But if I do so, I do get validation error. So what is the right approach.
Can anyone please help me on this?
Please ensure that all script tags are of type application/ld+json. There should be no executable code in these script tags.
Redirection is something that you must be doing on your end. Google doesn't do any sort of redirection from AMP to non-amp pages if the URL is hit directly. In fact that URL schema that Google uses in their carousel is entirely their own, and just includes the path to your page inside it. E.g. https://cdn.ampproject.org/v/www.yoursitehere.com/path/to/article.html
Social sharing using Javascript inserted in the page is not allowed, as no Javascript is allowed. If you want to use social sharing, use a non-javascript implemention, or try out the amp-social-share
thanks for the response. As per the query which I asked
Please ensure that all script tags are of type application/ld+json. There should be no executable code in these script tags - I am not using any Script as of now except amp only
Redirection is something that you must be doing on your end. Google doesn't do any sort of redirection from AMP to non-amp pages if the URL is hit directly. In fact that URL schema that Google uses in their carousel is entirely their own, and just includes the path to your page inside it. E.g. https://cdn.ampproject.org/v/www.yoursitehere.com/path/to/article.html -
Understood
Social sharing using Javascript inserted in the page is not allowed, as no Javascript is allowed. If you want to use social sharing, use a non-javascript implementation, or try out the amp-social-share - Implemented Social Share and its working fine
Can we implement AMP for eCommerce sites where a lot of JavaScript, forms, plugins can be included? As of my knowledge AMP wants to keep it simple and thus restrict as many JavaScript, form tag is not valid only. So is there any chance we can implement AMP on eCommerce sites.

Link to an insecure page from secure canvas page no longer working in Chrome

It looks like a recent Chrome update broke this by tightening mixed content (https/http) security policies, and I read that Firefox plans to do this too.
Here's the issue:
Say I set the Secure Canvas URL of my app to https://themediadudes.com/httpstest/
That page contains only a link to Google:
Google
When I view the app on Facebook and click the link, nothing happens. An error appears in the console:
[blocked] The page at https://apps.facebook.com/myappname/ ran insecure
content from http://www.google.com/.
I understand that having insecure scripts/stylesheets etc. on an https page isn't allowed, but a simple link to a different website shouldn't be blocked right?. I assume Facebook is running some scripts which do something with the page before sending the user there? Which causes the error.
If I set the target of the link to _top or _blank it works.
Ideally I want to be able to use a javascript window.location to send the user to this insecure URL, or header('Location: blah'); in PHP. But neither of those work either. And it looks like this is a bigger problem than that if even a simple link to an insecure URL doesn't work.
I thought it may be caused by whatever makes the 'fluid' canvas width and canvas height settings work. But I tried setting both width and height to fixed and the problem still happens.
Does anybody have a solution or workaround, or can anybody at least shed some more light on this?
Thanks
I've been struggling with a similar issue and the answer seems to be that it is not possible at all to reference any non-https resources from within your page tab app. Of course if a google link is all you require then that is simply resolved (as google has a https version of course) but referencing external non-https sites will always turn up this warning/block in chrome
Additionally, I should add that I have noticed that the 'page tab URL' section requires a url to a particular page, whereas the 'canvas URL' needs to link to a directory. This does not seem to be documented and will also give the insecure content message in chrome and prevent the page tab app from loading

Facebook application (Static HTML)

I'm trying to create a landing page on facebook with the Static HTML application, but the image does not appear in IE8 show only at 9 and other browsers like Chrome and Firefox.
The application link is: https://www.facebook.com/hyundainic/app_128953167177144.
Yet another application that looks like:
https://www.facebook.com/SomosEskimo/app_367456286664440.
This if displayed in all browsers, except that technically I do not know if it's the same.
I'm editing the html / css and occupy absolute and relative positioning, I thought that this could affect and remove it, but the problem persists forever.
Can someone help me with this?
I think the issue is probably that you are using an absolute, non-SSL URL for the image source, and the links you posted to the app use SSL. If you leave the protocol off (example: "//whatever.com/myimage.jpg" instead of "http://whatever" or "https://whatever") the browser will use https when needed.
However, it looks like your image doesn't work over SSL:
https://hyundai.com.ni/img/quickservice-fb.jpg?id=3
You can try viewing your app using http:// and confirm it displays ok in all targeted browsers to see if this is really your issue.

Page renders on browsers but throws "404 page not found" for SEO crawlers and/or requests made by program. What could be the issue?

I built a site out of ZF and installed it fine on my server. I have the MVC structure and use custom routing (for SEO purposes) as below:
mysite.com/controller.html
mysite.com/controller/action.html
Generally, everything is working fine but the only problem is that SE crawlers won't find any .html files. If i open the "Activity" window from Safari, I see all the css and other files being referenced/read fine but not the page itself.
So, the page renders fine on a browser but SE crawlers or any program that made the request won't find the page. I'm wondering if it's an Apache issue. My .htaccess file is the same file that shipped with the ZF.
I really appreciate any advise/suggestions/comments!
Is it possible that your app is serving all pages with a 404 status code? So browsers and crawlers are getting the same thing, but the browser will render the content whereas the crawlers ignore it. I've seen some people use the Error Controller in ZF as a way of doing routing (not a good idea), where the Error Controller 'catches' all requests and then examines the params to determine what to display.
If this isn't your problem please could you edit your question to include:
How it is you know that crawlers are getting a 404
Some more info on how you are doing your routing
Also if you can provide an example URL we can check the headers that are being returned.

Document Interaction not always triggered from Safari

Through Document Interaction, my iOS app registers itself as an editor of .sgf and .ugi files. So I can open such files from - let's say - attachements in Mail.
However, when trying the same from Safari, I get inconsistent behavior. I try to open .sgf documents that are available via HTTP into my App.
Some http links trigger the gray box with "Open in..." button... Good.
http://gtl.xmp.net/reviews/data/82/8201-DavidB-mukai-jettero.sgf
Other links open as a text file in Safari... Unwanted.
http://learngo.world-go.org/golibrary/samplelessons/studygroup30k/2004-06-11_20-30k.sgf
Is there a way to get the "open in..." button on all?
After some research I got most of the answer from this page:
https://developer.mozilla.org/en/Properly_Configuring_Server_MIME_Types
And this web tool:
http://www.rexswain.com/httpview.html
SafariMobile looks at the MIME-type that is returned by the web server to determine what to do with the link (view within Safari or offer 'Open In...'.
Supported types like 'text/plain', 'text/html', 'image/gif' are all displayed within Safari. Whereas an unsupported type like 'application/zip' will trigger the 'Open in...' interface.
But Safari will even try to display a link of the type 'application/octet-stream', which is the mime-type typically used for unknown binary formats. I suppose Apple did this to overcome web servers that fail to provide the proper mime-type.
Supplying the type along within the HTML code is ignored by Safari.
<a href='file.sgf' type='application/x-go-sgf'>
The only (I think) solution is to change the configuration of the web server.