Is it possible to prevent Google Web Light from removing multipart attributes from form tag? - forms

I have a form that contains a file input and the form is configured correctly to handle this normally. The form tag contains the following attribute:
enctype="multipart/form-data"
This works fine in all normal browsers, but not in Google Web Light. In Google Web Light I noticed that the file name is being passed, but not the associated file data.
Upon inspection of the page as modified through Google Web Light I noticed the enctype attribute was removed and I believe this is the issue with why the file data is not getting passed the form's action.
Is there any way to prevent Google Web Light from doing this?

I'm also looking for a way of having Google Web Light preserve:
enctype="multipart/form-data"
As a workaround, have you tried 'Opting out of transcoding' from https://support.google.com/webmasters/answer/6211428?hl=en ?
If you do not want your pages to be transcoded, set the HTTP header "Cache-Control: no-transform" in your page response. If Googlebot sees this header, your page will not be transcoded.

Related

Is there any way to get the HTML from a web page once the JavaScript is loaded in a Flutter app?

I'm working on a URL preview widget, so I'd like to extract the meta tags from the HTML of a given URL.
However, the problem is that websites like Twitter don't return the entire HTML when they detect there's no JavaScript engine enabled (i.e. doing a GET request from the http package).
So, I'd like to know if there's any workaround for these cases, for example, using some kind of headless browser to get the entire HTML.
Thanks!

Is it possible to add adverts to a custom Facebook Page Tab app?

I need to create a custom Facebook Page Tab app which will show an external site in an iframe. This need to have adverts on it but I'm not sure if this is possible as the site is hosted externally.
I'm not sure if I need to sign up to the Facebook Audience Network to get approved etc. either?
Any help or advice would be great.
Many browsers have this limitation of not allowing external sites to be shown in an iframe. Imagine the case when you are working hard to create a site and others show all your content in iframes. That is, naturally frustrating.
However, there is a candidate-solution: Let's suppose you create a page which sends a request to the other site and appends all the content into the body and head of your page. This is very much possible, so the solution is to:
Create a page in your site, let's call it outsider
In the server-side code of your outsider page send a request to the desired page to be shown
You will get the html of the page. Process it and include its content into the head and body of outsider. This includes:
3.1. Checking all the CSS to be reached, as the target page might refer to local CSS, which is unreachable locally at your end. Process the URLs of CSS files
3.2. Checking all the Javascript to be reached, as the target page might refer to local JS, which is unreachable locally at your end. Process the URLs of JS files
3.3. Apply the idea described in 3.1. and 3.2. for other resources, like images, until you are satisfied with the content of outsider
Create an iframe, having the source to point to outsider. outsider is inside your scope, so it should be shown
NOTE: If the site owning the target page does not like the possibility of you showing their content inside iframes, they might protect it by, let's say, having Javascript in their code, which checks whether the page is inside an iframe. Remove that code while processing the response to your request. If nothing else prevents you from showing the page in an iframe, then you should achieve success.

ASP Classic - Passing form data to Iframe

I'm looking to pass data from a form into an iFrame, but I have a slight problem.
The form page I can edit with no restrictions
The page I send the data to I cannot edit unless its html or JavaScript
The data needs to end up in an iframe within this page, which I can edit with no restrictions
I'm incorporating a search function into a CMS system which is why I cannot edit the iframe's parent page, and why I am using iframes at all.
At the moment the data sends to the parent page but is not picked up within the iframe, I am sending via the POST method.
I got it..
Added and extra page which converted the post data into session data,
if anyone knows a better way i would like to hear it though.
And they are the same domain, but editing the CMS system would have taken ages to look through as its not mainstream or developed by me.
Maybe I'm oversimplifying the problem, but can't you use the "target" attribute of the form tag to post to the Iframe?

Form POST returns 302 from within Joomla, works great outside

I have a form that submit a shopping cart to Google Checkout. The form works great on it's own, but when I put it inside of Joomla (using a content-type of wrapper), Google Checkout throws a 302, and the form page is loaded again.
As I was writing this, I then decided to see what happens from the static form, outside of Joomla. It took gets a 302, but Google Checkout loads.
If I go directly to the request url listed in the resource inspector (using chrome for this), I get an error:
Oops!
We were unable to process your request.
That happens on both the Joomla wrapped form and the stand alone.
However, both forms receive response headers, with a Location url that goes to Google Checkout, and in fact loads the proper data.
Any ideas how to get this working inside of Joomla? Or what I might be doing wrong?
I don't know this stuff well enough to explain myself too well, so if you have a clarifying question, I'd be more than happy to provide as much info as possible.
The issue was in fact that the form was trying to redirect the entire page from inside an i-frame. Brought the form out into a component and it works fine.

Just can't seem to fetch the mobile Gmail html, what is wrong?

I'm trying to cache the mobile Gmail webpage because UIWebView does not cache the content itself (mobile safari does, but not UIWebView).
I tried the methods listed here Reading HTML content from a UIWebView basically saving the html either directly from URLRequest or from UIWebView itself. When I try to put the html saved back into UIWebView it is not the same page!
This is the page that I want to save
alt text http://img39.imageshack.us/img39/5679/screenshot20090830at123.png
This is the page that the html saved will display
alt text http://img39.imageshack.us/img39/8734/screenshot20090830at122.png
If you're loading using loadData:MIMEType:textEncodingName:baseURL: make sure you're setting baseURL correctly - that way, the WebView will know where to look for relative stylesheets and so on.
Edit: For example, if I was saving this page, I'd set the base URL to Just can't seem to fetch the mobile Gmail html, what is wrong?.
That looks like the same page to me, but with different stylesheets attached. If you're just re-displaying identical HTML from your local server, the relative stylesheet paths in Google's HTML would no longer be correct. Also, any AJAX requests meant to run after the page loads would no longer work (both because the relative paths to the scripts would be wrong, and also because Cross-Site Scripting restrictions would prevent them from contacting Google).
Attempting to scrape content from an AJAX-enabled application is no small undertaking. You'd have to replicate a lot of GMail's functionality to truly reproduce the exact page Google presents.