I am requesting aspx page which is using reportviewer controlĀ and returning html.
Problem faced:
IOS 5 : It fails to render this html on first attempt. But when you close the app and log in again, Report is getting rendered properly after a long time.
IOS-4 : It works fine there, that is, html is getting rendered properly in first attempt on webview.
Research:
1)On browsers firebug, I saw that aspx url itself making multiple internal requests, that is, 1 main aspx is calling internally urls such as
a)http://..../..../Reserved.ReportViewerWebControl.axd?ReportSession=.....
b)about blank
2)When I compare IOS-4 and IOS-5 request logs, I saw there is requests mismatch. In IOS-4, there were 6 requests in total where as in IOS-5 there were 5 requests. In some of the request,webview didfinishload delgate not getting fired.
3)I tried with google.com, its getting rendered properly on both IOS.
4)I pasted the url on safari browser of iphone,the report is getting displayed properly.
I am using this:
[wvDisplayHTMLURL loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:strURLHTML]]];
where strURLHTML contains aspx url and wvDisplayHTMLURL is webview.
Is the problem is from iphone side or server side(Ajax/Javascript)?
Any one has solution for this? Where am i wrong?
Apple seems to have made some changes in the WebView control for iOS 5.
I think your best option would be to identify and solve this issue from server side.
Related
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.
I'm getting a strange issue only Chrome + Firefox. It doesn't repro on IOS or IE9.
Here's the repro:
Load Home page http://example.com
Login (via a rel="external" hyperlink). In my case I use Facebook's Oauth Server Side flow - so this URL is a facebook.com.
Facebook accepts the user's credentials and then redirects to http://example.com/user/callback. Here various facebook data is processed (it is provided in the query string).
The server side code at http://example.com/user/callback then redirects the user to http://example.com. The mechanism used for the redirect is a RedirectToAction from ASP.NET MVC3. This returns a 302.
Expected Result:
User would see a URL in their browser = http://example.com and the content all nicely shown. This works on IE and Safari.
Action Result (on Chrome Only)
User gets a URL in their browser = http://example.com/#base_domain=example.com
The actual page is blank (no visible content)
However a view source reveals that the content is present.
Action Result (on Firefox Only)
User gets a URL in their browser = http://example.com/#_=_
The actual page is blank (no visible content)
However a view source reveals that the content is present.
Additional Info
If I enter the URL http://example.com/#base_domain=example.com into IE I get the same 'hidden' content (i.e. blank page with HTML source still present).
I should also note I use the RedirectToAction/302 redirect technique in other parts of the application with no issues whatsoever.
The issue also repros with AJAX navigation turned off.
EDIT: This also works on Safari (OSX + Windows) with no issues. It's only apparently broken on Chrome + Firefox on both Windows and PC.
IOS/Safari: OK
Win/Safari: OK
Win/IE: OK
Windows Phone Emulator: OK
Win/Firefox: borked
Win/Chrome: borked
OSX/Safari: OK
OSX/Firefox: borked
OSX/Chrome: borked
Not sure about Android.
The best solution appears to be setting the Push State and Hash Listening to false - so chrome/ff completely ignore them. I already had AJAX navigation disabled (there some interesting behaviours with it I hadn't completely accounted for yet with my server side code).
$.mobile.pushStateEnabled = false;
$.mobile.hashListeningEnabled = false;
I'll probably wait for 1.1 and stabilise the rest of my code before trying to get AJAX navigation working.
I'm using a UIWebView to display html pages which contain links, some of the links are to local files (file://...) and some are to remote web site (http://... ).
For some sites shouldStartLoadWithRequest gets called twice, for example if the html contains:
<a href="http://www.zagat.com/Verticals/PropertyDetails.aspx?VID=8&R=36121">
Then shouldStartLoadWithRequest gets called as expected with a request of
"www.zagat.com/Verticals/PropertyDetails.aspx?VID=8&R=36121"
But then it gets called again but this time with a redirection request of
"http://zagat.mobi/"
Is it possible to get feedback from the UIWebView when this is happening?
This happens when a site redirects you to their mobile version. I just tested this in the Safari iPhone App with the link you posted and it indeed redirects to Zagat's mobile site. Some websites are smarter than others as to where you get redirected. You can force the page to load the non-mobile version by not allowing redirects.
If I create a basic asp.net application and set the #outputcache the page is cached fine in chrome & IE on the desktop. First request returns 200, subsequent request return 304 for the default.aspx. (I'm monitoring through fiddler)
However accessing the same page from an iPhone I noticed that it's always returning 200 for the aspx file. All resources are being caching and are returning 304's. So it's just the aspx page.
Any ideas why this is happening?
Some technical details:
<%# OutputCache Duration="30" VaryByParam="None" Location="Any" %>
Stock standard ASPX page. Content-Length: 2464
Reloading on the iPhone using refresh control or keyboard "go" doesn't make a difference.
Explicitly setting eTag does not make a difference
Last-Modified is set
but If-Modified-Since is not being send for the ASPX page
Latest IOS 4.3.1
IIS 7.5 running on Win7 using ASP.NET 4
I think I figured it out. Feel free to correct me however. Website caching is a very messy area.
The root of the problem is that the iPhone is not sending "If-Modified-Since" headers with it's requests. Without that the server cannot reply with a 304.
After some experiments I've found that if you use a link to navigate to the page it will send the 'If-Modified-Since' header and everything works as expected and the server neatly returns a 304.
Cases where it does not send a "If-Modified-Since" even though it's cached:
Typing in the URL
Pressing the refresh button
Selecting the URL and pressing Go
Opening as a bookmark
Opening from a saved reference on the home screen
It only seems to be doing this for the primary url everything else that is referenced does have a "If-Modified-Since" header (where applicable).
Note: I've tested this on IOS 4.3.1 only. Looking at the link Paddo send and further investigation into that area it seems that Apple likes to change caching behaviour between IOS versions.
Found this, re php (will also apply to .net)... iphone doesn't seem to cache any resource over 15k in size, and total cache size is 1.5MB. Note this is old information so may have changed.
http://www.phpied.com/iphone-caching/
The solution for a file over 15k, is to use an offline application cache manifest file, as outlined here:
http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/Client-SideStorage/Client-SideStorage.html
PS I know your content length is below 15k - so something else must be amiss... but I'm still hopeful that the manifest file will work.
for ASP.NET just use
Response.AddHeader( "Cache-Control","no-cache");
or
Response.AddHeader( "Pragma", "no-cache");
or
Response.Cache.SetCacheability(HttpCacheability.NoCache);
I'm writing a ajax chatting webapp, just to test working with GWT.
To simulate server side push of chat messages from the server to the browser, I have a XHR request running behind. It all works fine - except on Chrome, the browser is displaying a loading icon (a spinner) because of the XHR request on background.
Is there any way to avoid this? I've tested it in Firefox, and it doesn't display such behavior.
EDIT - I found the solution. http://groups.google.com/group/google-web-toolkit/browse_thread/thread/a0330cb47e05c485?fwc=2
quoting the GWT groiup post:
Chrome shows the loading indicator if connection was made immediately
from the "body onload()", i.e. from onModuleLoad().
Chrome shows the loading indicator if connection was made immediately from the "body onload()", i.e. from onModuleLoad().
No, there is now way to disable this.
All AJAX requests cause Chrome to display this. I'm guessing it's for security reasons. (The user is aware of any AJAX requests that he/she might not be aware of.) Also, it indicates that data is being fetched - a type of status indicator.