Displaying content in uiwebview - uiwebview

I want to display information from web page in UIWebView. But the problem is website has headers, ads on the side etc. I want to display only the main content. Is this possible by any means?
Thanks!

Are you talking about a website? You could create a css specially for iPhone browser
<link type="text/css" rel="stylesheet" media="only screen and (max-device-width: 480px)" href="iPhone.css">
This stylesheet would be called only by an iPhone device.

Related

How can I show a picture before a link in google sites

I have a website that i've set up through google sites. I have a link to an external webpage. What I'd really like to have happen is, if someone clicks the link, it shows a jpg picture for about 5 seconds and then forwards them off to the linked website. Is there a way to do that?
Thanks,
Rich
Adding to following tag:
<META http-equiv="refresh" content="5;URL=http://example.com">
to the <head> section of a webpage will redirect the user to example.com, or whatever the URL value is. You can display an image in the <body> section of this page. This seems like the simplest way to accomplish what you want.

When using Video.js is there any way I can avoid the webpage content alert?

I'm trying to use Video.js to display a small video on our team sharepoint page (Sharepoint 2007). It works great, but the 'Do you want to view only the webpage content that was delivered securely?' alert always displays when you navigate to the page. The security settings on the computers cannot be changed, but is there any way I can avoid this alert being displayed?
Thanks in advance for any help.
Thanks,
Simon
This is happening because the page being accessed is served over HTTPS, but some content loaded remotely comes from HTTP. If you're using the Video.js CDN-hosted files, you'd want to change the include tags to look like this:
<link href="//vjs.zencdn.net/4.3/video-js.css" rel="stylesheet">
<script src="//vjs.zencdn.net/4.3/video.js"></script>
These are called protocol relative urls, meaning it will use whatever protocol the page is to load the files.
Hope that helps!

Security check to avoid direct visitor on a page

I have a page that I want to be loaded only from an iFrame.
I use the solution on this link to do it.
How to identify if a webpage is being loaded inside an iframe or directly into the browser window?
but it doesn't work in IE so I use conditional comments like this
<!--[if IE 9]>
<script type="text/javascript">
window.location = "http://mysite.com/nodirectvisit.html";
</script>
<![endif]-->
Together they are now working in IE, Chrome, FF, and Opera.
I just want to ask if there are still other ways to visit my page directly?
Thanks
If a user disables javascript, then your code will not run. Maybe use Sessions to track from where users are coming from?
Anyone with javascript disabled or NoScript would be able to open the page directly. The javascript should prevent the majority of users.
You can check the referrer of the iframe page to make sure it's the page that contains the iframe. The referrer isn't the most reliable field, but if you're more worried about people visiting the page not in an iframe than people not being able to see it at all, that might be the way to go.

Is there any way to use adsense in javafx 2.x webview

I created a simply html page include css and js.
When the page is using in the webview How i can add adsense ? Does AdSense work fine ?
WebView is just a html viewer. There is no reason why it would not work with Google AdSense. Adsense generates html ads which should be viewable in a WebView.
Create the appropriate html for including Adsense in a document by following Google's documentation.
Load your html in a standard browser like Chrome and ensure that advertisements are displaying correctly there.
Once your advertisements are displaying correctly in Chrome, then load the same html into WebView - it should work fine.

Chrome extension HTML Link wont direct to the website

I have a new extension I'm making, the button makes a drop down popup and in that I have the HTML code
<html>
Google
</html>
This code should direct to google, shouldn't it? I know that its working because Google comes up on the popup but when I click it it does nothing.
Use anchor tag with : target="_blank"

Resources