Search Results

Search found 213 results on 9 pages for 'iframes'.

Page 8/9 | < Previous Page | 4 5 6 7 8 9  | Next Page >

  • chrome extension login security with iframe

    - by Weaver
    I should note, I'm not a chrome extension expert. However, I'm looking for some advice or high level solution to a security concern I have with my chrome extension. I've searched quite a bit but can't seem to find a concrete answer. The situation I have a chrome extension that needs to have the user login to our backend server. However, it was decided for design reasons that the default chrome popup balloon was undesirable. Thus I've used a modal dialog and jquery to make a styled popup that is injected with content scripts. Hence, the popup is injected into the DOM o the page you are visiting. The Problem Everything works, however now that I need to implement login functionality I've noticed a vulnerability: If the site we've injected our popup into knows the password fields ID they could run a script to continuously monitor the password and username field and store that data. Call me paranoid, but I see it as a risk. In fact,I wrote a mockup attack site that can correctly pull the user and password when entered into the given fields. My devised solution I took a look at some other chrome extensions, like Buffer, and noticed what they do is load their popup from their website and, instead, embed an iFrame which contains the popup in it. The popup would interact with the server inside the iframe. My understanding is iframes are subject to same-origin scripting policies as other websites, but I may be mistaken. As such, would doing the same thing be secure? TLDR To simplify, if I embedded an https login form from our server into a given DOM, via a chrome extension, are there security concerns to password sniffing? If this is not the best way to deal with chrome extension logins, do you have suggestions with what is? Perhaps there is a way to declare text fields that javascript can simply not interact with? Not too sure! Thank you so much for your time! I will happily clarify anything required.

    Read the article

  • Refresh a Div that has a Google ad inside it

    - by Abs
    Hello all, I have a div that holds a google ad. My website is mostly AJAX and there is no need for a browser refresh. That means my ads will not refresh either, which isnt ideal, a user staring at one ad all day. So I wanted a way to refresh a particular div on a page. I found many solutions but they didnt work. For example, using JQuery's html function: $("#ads").html("google ad script here"); This managed to refresh the whole page no idea how. I can also make an AJAX request to a HTML page that contains the google ad but I am guessing it will have the same effect as the above attempt. I do not want to use iFrames. Is there any other option open to me? My pea brain can not think of anymore. :) Thanks you for any help. EDIT: It is allowed since I will be initiating the refresh only when a user clicks a link. A prime example is Yahoo Mail - their new AJAX mailbox uses this same method, when a user clicks a link then a new ad is shown.

    Read the article

  • how to enable iFrame designMode in a local webpage without using the localhost server?

    - by vjk2005
    The code... <html> <body> <iframe id="editableFrame"></iframe> <script type="text/javascript"> editableFrame.document.designMode="on"; </script> </body> </html> gets the iFrame editable only when run off a server(http://...)(online or from localhost). How do I get this working by simply opening it up as a local html file(file:///...) in the browser? Some browser specific notes: 1. Firefox needs slightly different code to enable designMode but the problem still remains. 2. IE8 gets me the behavior I want with this code, but it pops up a warning about enabling ActiveX controls which the user must accept before getting the iFrame editable. 3. Opera 10.5 is the only browser that has the behavior I want... iFrames are editable without needing to run the code off a server.

    Read the article

  • Accomplishing This Style of Drop-Down Menus in jQuery

    - by Maxim Z.
    I was browsing the web and found this site. I noticed how the nav bar drop-down works, and I want to implement something similar on my website. Afer going into the source code of the page, I found that those drop-down areas are contained in divs with class fOut. It turns out that this is being done with MooTools. Here is the script itself (referenced in the original page after the Mootools script itself): window.addEvent('domready', function() { $("primaryNav").getChildren("li").addEvents({ "mouseenter": function(){ $(this).addClass("hover").getChildren("a").addClass("hover"); }, "mouseleave": function(){ $(this).removeClass("hover").getChildren("a").removeClass("hover"); } }); $$(".fOut").each(function(el,i){ var ifr = $(document.createElement("iframe")); ifr.className = "ieBgIframe"; ifr.frameBorder = "0"; ifr.src="about:blank"; ifr.injectInside(el); var p = el.getParent(); p.addClass("hover"); var h = el.getSize().size.y; p.removeClass("hover"); ifr.height=h; }); $$(".olderVersionsToggle").addEvents({ "click": function(e){ var event = new Event(e); event.stop(); var p = $(this).getParent().getNext(); if(p.hasClass("open")){ p.removeClass("open"); $(this).setText("Show previous versions..."); } else{ p.addClass("open"); $(this).setText("Hide previous versions..."); } return false; } }); }); My Question(s) I have two questions about this code. How does it work? I don't quite understand what it's doing, with the iframes and all. How can this be implemented in jQuery?

    Read the article

  • Read IFrame content using JavaScript

    - by Rajat
    Ok, This is my first time dealing seriously with IFrames and I cant seem to understand a few things: First the sample code I am testing with: <head> <script type="text/javascript"> function init(){ console.log("IFrame content: " + window.frames['i1'].document.getElementsByTagName('body')[0].innerHTML); } </script> </head> <body onload="init();"> <iframe name="i1" src="foo.txt"/> </body> the file "foo.txt" looks like this: sample text file Questions: 1) The iframe seems to be behaving as a HTML document and the file text is actually part of the body instead. Why ? Is it a rule for an IFrame to be a HTML document. Is it not possible for the content of an iframe to be just plain text ?? 2) The file content gets wrapped inside a pre tag for some reason. Why is this so ? Is it always the case? 3) My access method in the javascript is working but is there any other alternative? [native js solutions please] If the content is wrapped in a pre tag always then I will actually have to lookup inside the pre tag rather than lookup the innerHTML

    Read the article

  • Most efficient method of detecting/monitoring DOM changes?

    - by Graza
    I need an efficient mechanism for detecting changes to the DOM. Preferably cross-browser, but if there's any efficient means which are not cross browser, I can implement these with a fail-safe cross browser method. In particular, I need to detect changes that would affect the text on a page, so any new, removed or modified elements, or changes to inner text (innerHTML) would be required. I don't have control over the changes being made (they could be due to 3rd party javascript includes, etc), so it can't be approached from this angle - I need to "monitor" for changes somehow. Currently I've implemented a "quick'n'dirty" method which checks body.innerHTML.length at intervals. This won't of course detect changes which result in the same length being returned, but in this case is "good enough" - the chances of this happening are extremely slim, and in this project, failing to detect a change won't result in lost data. The problem with body.innerHTML.length is that it's expensive. It can take between 1 and 5 milliseconds on a fast browser, and this can bog things down a lot - I'm also dealing with a large-ish number of iframes and it all adds up. I'm pretty sure the expensiveness of doing this is because the innerHTML text is not stored statically by browsers, and needs to be calculated from the DOM every time it is read. The types of answers I am looking for are anything from the "precise" (for example event) to the "good enough" - perhaps something as "quick'n'dirty" as the innerHTML.length method, but that executes faster.

    Read the article

  • Loading dynamic external content into the Div of another on click

    - by Robin I Knight
    Trying to load an external php file into another onClick. Iframes will not work as the size of the content changes with collapsible panels. That leaves AJAX. I was given a piece of code HTML <a href="#" id="getData">Get data</a> <div id="myContainer"></div> JS $('#getData').click(function(){ $.get('data.php', { section: 'mySection' }, function(data){ $('#myContainer').html(data); }); }); PHP: <?php if($_GET['section'] === 'mySection') echo '<span style="font-weigth:bold;">Hello World</span>'; ?> I have tested it here http://www.divethegap.com/scuba-diving-programmes-dive-the-gap/programme-pages/dahab-divemaster/divemaster-trainingA.php and get the most unexpected results. It certainly loads the right amount of items as it says in the lower bar on safari but I see three small calendars and that is it. Can anyone see where I have made a mistake?

    Read the article

  • Images in IFRAME no longer showing after I log out of Flickr?

    - by contact-kram
    I have a iframe window which displays user's flickr images. I use the flickr.photos.search api to download the user's image from flickr. This works great when the user is logged into flickr. But when I explicitly log off the user from flickr and the yahoo network and then attempt to download the flickr images, I get redirected to www.yahoo.com in a full browser window (not in my iframe). If I remember correctly, I did not have this issue when I was not using iframes and I was being redirected to the yahoo login screen. Any suggestions? To elaborate, this URI - http://www.flickr.com/services/api/auth.howto.web.html, lists the below step - Create an auth handler When users follow your login url, they are directed to a page on flickr.com which asks them if they want to authorize your application. This page displays your application title and description along with the logo, if you uploaded one. When the user accepts the request, they are sent back to the Callback URL you defined in step 2. The URL will have a frob parameter added to it. For example, if your Callback URL was http://test.com/auth.php then the user might be redirected to http://test.com/auth.php?frob=185-837403740 (The frob value in this example is '185-837403740'). This does not happen when I am in my iframe window but it does happen in my full browser window.

    Read the article

  • Resize iframe to show first element works except in IE 7

    - by Rob Fenwick
    I have two iframes on my home page, the script below is in the head of the page that is being displayed in the iframe, there are several divisions on the page in a container div with an id of 'content', I want to size the iframe on the home page so that just the first div is initially seen and to scroll to see the rest. It is working in all browsers that I have tried except IE 7, I don't care too much about earlier browsers. IE 7 is acting like the page being shown is blank and sizing the iframe to 0 height, can someone tell me why IE 7 is having a problem with it, and failing that how can I get IE 7 to ignore the script? function resizeIframe() { //get the firstChild of a container div with the id 'content' var div01 = document.getElementById("content").firstChild; //find the first element ignoring white spaces and returns while(div01.nodeType!=1){ div01 = div01.nextSibling; } // get the height of first element var boxHeight = div01.clientHeight; //set the height of iframe the id of the iframe is 'news' parent.document.getElementById('news').height = boxHeight; } I have the function called in the body tag. If someone could help me I'd very much appreciate it. The page that it is on is at wsuu.org The version with the script is not up but you can get an idea of what I'm trying to do. Rob

    Read the article

  • PHP Header redirection problem within page called by cURL

    - by Das123
    I have a site that uses cURL to access some pages, stores the returned results in variables, and then uses these variables within its own page. The script works well except where the target cURL page has a header('Location: ...') command inside it. It seems to just ignore this header command. The cURL command is as follows... //Load result page into variable so portions can be allocated to correct variables $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); # URL to post to curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 ); # return into a variable curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $loaded_result = curl_exec( $ch ); # run! curl_close($ch); I've tried changing the CURLOPT_HEADER to 1 but it doesn't do anything. So how can I allow script redirection within the target urls using cURL to grab the results? By the way, the pages work fine if accessed other than via cURL but iFrames are not an option in this instance.

    Read the article

  • Modifying DIV CSS properties from within a deeply nested IFRAME.

    - by clintboxe
    I'm working with a business intelligence tool that only gives me access to a deeply nested iframe to add code. Ideally I would like to use jQuery and/or plain old JavaScript to modify the left and position CSS of a div that is 3 iframes above my IFRAME. I have access to add JavaScript/HTML to divArea0_1 within the reportiframe IFRAME. I would like to modify the propdiv DIV contained within the JSTabbedPanel IFRAME. Hopefully the HTML below is legible enough. :) Any ideas or help is greatly appreciated. <html> <div id = "tabs"> <iframe id = "tabbedPanel"> <iframe id = "JSTabbedPanel"> <div id = "treeTypeDiv"> <div id = "treediv"> <iframe id = "treeFrame"></iframe> </div> <div id = "propdiv"> <iframe id = "propFrame"> <div id = "reportpane"> <iframe id = "reportiframe"> <div id = "divEntire"> <div id = "divArea0_1"> <div id = "MyCode goes HERE"></div> </div> </div> </iframe> </div> </iframe> </div> </div> </iframe> </iframe> </div> </html>

    Read the article

  • When do Symfony's user attributes get written to session?

    - by Rob Wilkerson
    I have a Symfony app that populates the "widgets" of a portal application and I'm noticing something (that seems) odd. The portal app has iframes that make calls to the Symfony app. On each of those calls, a random user key is passed on the query string. The Symfony app stores that key its session using myUser->setAttribute(). If the incoming value is different from what it has in session, it overwrites the session value. In pseudo-code (and applying a synchronous nature for clarity even though it may not exist): # Widget request arrives with ?foo=bar if the user attribute 'foo' does not equal 'bar' overwrite the user attribute 'foo' with 'bar' end What I'm noticing is that, on a portal page with multiple widgets (read: multiple requests coming in more or less simultaneously) where the value needs to be overwritten, each request is trying to overwrite. Is this a timing problem? When I look at the log prints, I'd expect the first request that arrives to overwrite and subsequent requests to see that the user attribute they received matches what was just put into cache by the initial request. In this scenario, it could be that subsequent requests begin (and are checked) even before the first one--the one that should overwrite the cached value--has completely finished. Are session values not really available to subsequent requests until one request has completed entirely or could there be something else that I'm missing? Thanks.

    Read the article

  • How to access frame (not iframe) contents from jQuery.

    - by kazanaki
    Hello I have 2 frames in one page like this (home.html) <frameset rows="50%, 50%"> <frame id="treeContent" src="treeContent.html" /> <frame id="treeStatus" src="treeStatus.html" /> </frameset> and then in one frame (treeStatus.html) I have something like <body style="margin: 0px"> <div id="statusText">Status bar for Tree</div> </body> I want from the top window to manipulate the div located in the child frame via jquery (e.g show and hide). I have seen several questions like this and they suggest the following $(document).ready(function(){ $('#treeStatus').contents().find("statusText").hide(); }); I do not know if this works with iframes but in my case where I have simple frames it does not seem to work. The code is placed inside home.html Here is some output from firebug console >>> $('#treeStatus') [frame#treeStatus] >>> $('#treeStatus').contents() [] >>> $('#treeStatus').children() [] So how do I access frame elements from the top frame? Am I missing something here?

    Read the article

  • Help me make a jquery AJAXed divs' links work like an iframe.

    - by Dave
    I want to make a few divs on the same page work similar to iframes. Each will load a URL which contains links. When you click on those links I want an AJAX request to go out and replace the div's html with new html from the page of the clicked link. It will be very similar to surfing a page inside an iframe. Here is my code to initially load the divs (this code works): onload: $.ajax({ url: "http://www.foo.com/videos.php", cache: false, success: function(html){ $("#HowToVideos").replaceWith(html); } }); $.ajax({ url: "http://www.foo.com/projects.php", cache: false, success: function(html){ $("#HowToProjects").replaceWith(html); } }); This is a sample of code that I'm not quite sure how to implement but explains the concept. Could I get some help with some selectors(surround in ?'s) and or let me know what is the correct way of doing this? I also want to display a loading icon, which I need to know where the right place to place the function is. $(".ajaxarea a").click(function(){ var linksURL = this.href; // var ParentingAjaxArea = $(this).closest(".ajaxarea");; $.ajax({ url: linksURL, cache: false, success: function(html){ $(ParentingAjaxArea).replaceWith(html); } }); return false; }); $(".ajaxarea").ajaxStart(function(){ // show loading icon });

    Read the article

  • Colorbox iFrame content not appearing in IE 8/9

    - by Rocketpig
    I'm using ColorBox to call a few informational modals on-screen and given the client's requirements, the best way to do this is via iFrames (not my first choice but whatever). Everything is working peachy in Chrome, FF, etc. but the iFrame content is not working in any version of IE. The modal wrapper appears but nothing is inside. This is what I've done so far: Changed the doctype to transitional and strict for IE. No dice. Removed the "iframe: true" and replaced it with HTML "Hello". That worked fine and "Hello" appeared in the Colorbox modal. I've removed all stylesheets from the header. No luck so it's not a CSS issue. Just to be sure, I rolled back my JQuery library to 1.6.2 from 1.8.2. Nothing there, either. Any help would be appreciated. This is aggravating. Some code: $(function () { $(".modal-large").colorbox({iframe:true, innerWidth:580, innerHeight:500}); }) HTML: <div class="top-droptext"><a class="modal-large" href="modal/serviceproviderinfo.html">Update Password</a></div>

    Read the article

  • get_browser not working

    - by tazphoenix
    it's not working.i mean i have many scripts to get ip and os but anyway get_browser is internal function and should work but its not.when i try to get a print_r on the function i get. Array ( [browser_name_regex] => §^.*$§ [browser_name_pattern] => * [browser] => Default Browser [version] => 0 [majorver] => 0 [minorver] => 0 [platform] => unknown [alpha] => [beta] => [win16] => [win32] => [win64] => [frames] => 1 [iframes] => [tables] => 1 [cookies] => [backgroundsounds] => [cdf] => [vbscript] => [javaapplets] => [javascript] => [activexcontrols] => [isbanned] => [ismobiledevice] => [issyndicationreader] => [crawler] => [cssversion] => 0 [supportscss] => [aol] => [aolversion] => 0 ) I'm using win7 and firefox.

    Read the article

  • Reading HTML header info of files via JS

    - by Morten Repsdorph Husfeldt
    I have a product list that is generated in ASP. I have product descriptions for each product in an HTML file. Each HTML file is named: <product.id>.html. Each HTML file size is only 1-3 kb. Within the HTML file is <title> and <meta name="description" content="..." />. I want to access these in an efficient way so that I can output this as e.g.: document.write(<product.id>.html.title);<br/> document.write(<product.id>.html.description); I have a working solution for the individual products, where I use the description file - but I hope to find a more efficient / simple approach. Preferably, I want to avoid having 30+ hidden iframes - Google might think that I am trying to tamper with search result and blacklist my page. Current code: <script type="text/javascript"> document.getElementById('produkt').onload = function(){ var d = window.frames[frame].document; document.getElementById('pfoto').title = d.title : ' '; document.getElementById('pfoto').alt = d.getElementsByName('description')[0].getAttribute('content', 0) : ' '; var keywords = d.getElementsByName('keywords')[0].getAttribute('content', 0) : ' '; }; </script>

    Read the article

  • IE8 error when using dyanamic form actions

    - by user330711
    Hello all: Please go here to see an iframe based web app. Click on the map of Australia, choose a city, then buy some tickets. Now you will see the cart form located on the lower right corner. The problem is in IE8, I cannot delete checked rows from the table; whereas in other browsers such as FireFox3.6, Opera10, Safari4 and Chrome4, this action is all right. Below is the related javascript. It doesn't use jQuery, as part of the requirement is no framework allowed! And iframes are the my best bet, ajax will simply kill me under this restriction. /* cartForm.js */ function toDeleteRoutes() //this function is executed before form is to be submitted. { if(document.getElementsByClassName('delete_box').length > 0) //there're rows to delete { document.getElementById('cartForm').action ="./deleteRoutes.php"; document.getElementById('cartForm').target ="section4"; return true; //this enables the form to be submitted as usual. } else return false; //there is no more row in table to delete! } function toSendEmail() //this function is executed before form is to be submitted. { document.getElementById('cartForm').action ="./sendEmail.php"; document.getElementById('cartForm').target ="section3"; document.getElementById('delete_btn').disabled = true; //disable delete button now return true; //this enables the form to be submitted as usual. } function toCancelPurchase() { document.getElementById('cartForm').action ="./cancelPurchase.php"; document.getElementById('cartForm').target ="section4"; return true; //this enables the form to be submitted as usual. } I don't know which part is wrong, or this is just because IE8 screws all?

    Read the article

  • Changing PHP variable from an <a href=""> link

    - by aener
    I'm making a site using divs. I have one across the top with a row of links which I want to change what's in the main window. I would prefer to keep strictly to PHP and HTML and use a full page refresh as I am comfortable with them at current, rather than using an Ajax refresh as I don't have any knowledge of Ajax. I don't want to use iframes. I thought the best way to do this would be as follows: <div id="top"> <a href="news.html">News</a> </div> <div id="main"> <?php include($page); ?> </div> What I need is a way of changing the $page variable upon clicking the link. If this means changing the variable and then reloading the page then so be it. A command following the logic of: <a href="news.html" action="<?php $page="news.html"; ?>">News</a> would be ideal! I thought about using a form, but it seems there should be an easier way.

    Read the article

  • Overriding CSS properties for iframe width

    - by user2898989
    I'm trying to put an iframe into a webpage, but no matter what I try to put in either the iframe properties or the custom CSS section of the website builder (or how many times I try to add !important to anything from width to right-margin), I can't get the iframe to extend rightward further than the page's preset width. Here's an example of the page and iframe that I'm working with: http://fmlcapitalinvestment.com/Search_Properties.html I need that script/iframe to be wide enough to show the search area. It seems pointless to copy and paste code and attributes I've tried setting, because nothing I do seems to have any effect, but just for showing how much I have no idea what I'm doing, here's my iframe code: <iframe id="idxFrame" style="padding:0; margin:0; padding-top: 0px; overflow-x:auto; width:1000px!important; border:0px solid transparent; background-color:transparent; max-width:none!important; right-margin:-200px!important" frameborder="0" scrolling="on" src="http://www.themls.com/IDXNET/Default.aspx?wid=8MSsp7Pf9eI55yjkDuB%2blX5awn7LnnVXh5PNYhq2ImAEQL" width="1200px" height="900px"></iframe> The "Website Builder" that I'm forced to use to make these kinds of pages is infuriating, but it does have a "Custom CSS" area where I can input additional CSS information. Is there something I could generically use to set iframes to their own widths?

    Read the article

  • redirecting _top page from asp:login control in iframe onloggedin

    - by jumpdart
    So yeah, Im building a little authenticated content(.NET app) to a large html site managed by another group. They are only comfortable with managing html so all my app content will be contained in iframes. Everything is working fine as far as navigation and calling services and whatnot but i cant bust out of the frame with my asp:login control. Im trying to register some JS on logged in but with no success. Thanks protected void login_LoggedIn(object sender, EventArgs e) { StringBuilder strScript = new StringBuilder(); strScript.Append("<script language='javascript'>"); string sHome = ConfigurationManager.AppSettings["AppHomePageURL"].ToString(); //strScript.AppendFormat("window.navigate('{0}');", sHome); //strScript.AppendFormat("parent.location.href='{0}';", sHome); //strScript.AppendFormat("window.open('{0}', '_top', '', false);", sHome); strScript.AppendFormat("top.location.href='{0}';", sHome); strScript.Append("WTF_let_me_outa_here();"); strScript.Append("</script>"); ClientScript.RegisterClientScriptBlock(typeof(Page), "LoginGO", strScript.ToString()); }

    Read the article

  • Show my website's content on other websites. Is iframe only option?

    - by Jashwant
    In my project, I have created a code snippet which can be copied and then put in any website. It shows my content on other websites. What I am using now is : <script type='text/javascript'> var user = 'abc'; var age = '23'; document.write('<iframe src="http://www.mysite.com/page.php?user='+ user + '&age=' + age + '" ></iframe'); </script> In page.php, I do some processing based on user and age and show dynamic content. My approach works fine. But when I look into some good standard ways to do such tasks, I find a different way. Take an example of google adsense code. <script type='text/javascript'> var a = 'somedata'; var b = 'someotherdata'; </script> <script type='text/javascript' src='http://www.google.com/adsenseurl.js'></script> I guess, since a and b are global; adsenseurl.js must be using it and may be finally they are showing it on iframe. So, now the question. What's the advantage in using google's approach and whats wrong in my approach ? p.s. I know I should try to avoid using iframes but I dont see any other way to accomplish this.

    Read the article

  • Taking advantage of Windows Azure CDN and Dynamic Pages in ASP.NET - Caching content from hosted services

    - by Shawn Cicoria
    With the updates to Windows Azure CDN announced this week [1] I wanted to help illustrate the capability with a working sample that will serve up dynamic content from an ASP.NET site hosted in a WebRole. First, to get a good overview of the capability you can read the Overview of the Windows Azure CDN [2] content on MSDN. When you setup the ability to cache content from a hosted service, the requirement is to provide a path to your role’s DNS endpoint that ends in the path “/cdn”.  Additionally, you then map CDN to that service. What WAZ CDN does, is allow you to then map that through the CDN to your host.  The CDN will then make a request to your host on your client’s behalf. The requirement is still that your client, and any Url’s that are to be serviced through the CDN and this capability have to use the CDN DNS name and not your host – no different than what CDN does for Blog storage. The following 2 URL’s are samples of how the client needs to issue the requests. Windows Azure hosted service URL: http: //myHostedService.cloudapp.net/cdn/music.aspx   - for regular “dynamic” content Windows Azure CDN URL: http: //<identifier>.vo.msecnd.net/music.aspx   - for CDN “cachable” content. The first URL path’s the request direct to your host into the Azure datacenter.  The 2nd URL paths the request through the CDN infrastructure, where CDN will make the determination to request the content on behalf of the client to the Azure datacenter and your host on the /cdn path. The big advantage here is you can apply logic to your content creation.  What’s important is emitting the CDN friendly headers that allow CDN to request and re-request only when you designate based upon it’s rules of “staleness” as described in the overview page. With IIS7.5 there is an underlying issue when the Managed Module “OutputCache” is enabled that in order to emit a good header for your content, you’ll need to remove, and in my sample, helps provide CDN friendly headers.  You get IIS 7.5 when running under OS Family “2” in your service configuration. By default, and when the OutputCache managed module is loaded, if you use the HttpResponse.CachePolicy to set the Http Headers for “max-age” when the HttpCacheability is “Public”, you will NOT get the “max-age” emitted as part of the “Cache-control:” header.  Instead, the OutputCache module will remove “max-age” and just emit “public”.  It works ok when Cacheability is set to “private”. To work around the issue and ensure your code as follows emits the full max-age along with the public option, you need to remove as follows: <system.webServer>   <modules runAllManagedModulesForAllRequests="true">     <remove name="OutputCache"/>   </modules> </system.webServer>   Response.Cache.SetCacheability(HttpCacheability.Public); Response.Cache.SetMaxAge(TimeSpan.FromMinutes(rv));   In the attached solution, the way I approached it was to have a VirtualApplication under the root site that has it’s own web.config  - this VirtualApplication is the /cdn of the site and when deployed to Azure as a Web Role will surface as a distinct IIS Application – along with a separate AppDomain. The CDN Sample is a simple Web Forms site that the /default landing page contains 3 IFrames to host: 1. Content direct from the host @   http://xxxx.cloudapp.net/cdn 2. Content via the CDN @ http://azxxx.vo.msecnd.net  3. Simple list of recent requests – showing where the request came from.   When you run the sample the first time you hit the page, both the Host and the CDN will cause 2 initial requests to hit the host.  You won’t see the first requests in the list because of timing – but if you refresh, you’ll see that the list will show that you have 2 requests initially. 1. sourced direct from the Browser to the HOST 2. sourced via the CDN The picture above shows the call-outs of each of those requests – green rows showing requests coming direct to the HOST, yellow showing the CDN request.  The IP addresses of the green items are direct from the client, where the CDN is from the CDN data center. As you refresh the page (hit Ctrl+F5 to force a full refresh and avoid “304 – not changed”) you’ll see that the request to the HOST get’s processed direct; but the request to the CDN endpoint is serviced direct from the CDN and doesn’t incur any additional request back to the HOST. The following is the Headers from the CDN response (Status-Line) HTTP/1.1 200 OK Age 13 Cache-Control public, max-age=300 Connection keep-alive Content-Length 6212 Content-Type image/jpeg; charset=utf-8 Date Fri, 11 Mar 2011 20:47:14 GMT Expires Fri, 11 Mar 2011 20:52:01 GMT Last-Modified Fri, 11 Mar 2011 20:47:02 GMT Server Microsoft-IIS/7.5 X-AspNet-Version 4.0.30319 X-Powered-By ASP.NET   The following are the Headers from the HOST response (Status-Line) HTTP/1.1 200 OK Cache-Control public, max-age=300 Content-Length 6189 Content-Type image/jpeg; charset=utf-8 Date Fri, 11 Mar 2011 20:47:15 GMT Last-Modified Fri, 11 Mar 2011 20:47:02 GMT Server Microsoft-IIS/7.5 X-AspNet-Version 4.0.30319 X-Powered-By ASP.NET   You can see that with the CDN request, the countdown (age) starts for aging the content. The full sample is located here: CDNSampleSite.zip [1] http://blogs.msdn.com/b/windowsazure/archive/2011/03/09/now-available-updated-windows-azure-sdk-and-windows-azure-management-portal.aspx [2] http://msdn.microsoft.com/en-us/library/ff919703.aspx

    Read the article

  • Dumb IE6 resize behaviour - hope it rings some bells with someone

    - by Ollie2893
    Hi, I'm having no end of fun (sic) with jQuery.tabs. The widget is quite crafty in that it turns basic HTML like so <div> <ul> <li>Tab #1</li> ... </ul> <div for panel #1> </div> <div for panel #2> </div> ... </div> into a cute tabbed dialogue. (It does so by restyling the UL and then toggling the "display" attribute for the panel DIVs to show/not show whatever panel is selected.) Now I found that I can spare myself a lot of trouble in my JS project if I insert a scrollable IFRAME into each panel. One usability problem I'm trying to ameliorate is that when the tabbed panel becomes larger than the browser's window, then the user ends up with too many scrollbars. I am trying to avoid this situation by linking the size of the tabbed panel to that of $(window). That is, I trap and process the resize event on $(window). To make my life bearable, all components are relatively sized. This is also true, in particular, of the IFRAMEs (100% width, 100% height). The only exception are the panel DIVs, which are of fixed height (in px). And this is the only dimension css attribute that I manipulate during my resize action. All of this works a treat in FF and Chrome, but IE6 is doing something rather cute: So long as I do not affect the width of the browser window (but only change its height), only the panel DIV changes in height; the IFRAME contained will not change. As a result of this behaviour, it is not possible to shorten the tabbed panel below the height of the IFRAME. I can lengthen the DIV, yes. But the IFRAME will not fill the panel in that case. All becomes good the moment I make the slightest change to the width of the browser window. In that moment, the IFRAME expands to catch up with the extended DIV or DIV and IFRAME contract in tandem. Bizarre. I inserted useless CSS instructions like "position: relative" and "zoom: 1". Also nudged the display with "display: block". No joy so far. Any ideas? Thanks.

    Read the article

  • Facebook Like box and Like buttons return Error

    - by spartan
    I'm integrating FB social plugins - Like box and Like buttons (as iframes) - on a web page, but they don't work. When I click on Like in "Like box", I get "Error" text with link, which displays a message dialog "The page at https://www.facebook.com/provocateur.eu could not be reached.". JSON response is: for (;;);{"__ar":1,"payload":{"requires_login":false,"success":false,"already_connected":false,"is_admin":false,"show_error":true,"error_info":{"brief":"Website Inaccessible","full":"The page at https:\/\/www.facebook.com\/provocateur.eu could not be reached.","errorUri":"\/connect\/connect_to_node_error.php?title=Website+Inaccessible&body=The+page+at+https\u00253A\u00252F\u00252Fwww.facebook.com\u00252Fprovocateur.eu+could+not+be+reached.&hash=AQARp73z7huT0Eiu"}}} When I click on the Like button, the JSON response is: for (;;);{"__ar":1,"payload":{"requires_login":false,"success":false,"already_connected":false,"is_admin":false,"show_error":true,"error_info":{"brief":"An error occurred.","full":"There was an error liking the page. If you are the page owner, please try running your page through the linter on the Facebook devsite (https:\/\/developers.facebook.com\/tools\/lint\/) and fixing any errors.","errorUri":"\/connect\/connect_to_node_error.php?title=An+error+occurred.&body=There+was+an+error+liking+the+page.+If+you+are+the+page+owner\u00252C+please+try+running+your+page+through+the+linter+on+the+Facebook+devsite+\u002528https\u00253A\u00252F\u00252Fdevelopers.facebook.com\u00252Ftools\u00252Flint\u00252F\u002529+and+fixing+any+errors.&hash=AQAFI_8ieMUGPPxS"}}} This is the "Like box" iframe code: <iframe frameborder="0" scrolling="no" style="border:none; overflow:hidden; width:240px; height:70px;" src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fprovocateur.eu&width=240&height=70&colorscheme=dark&show_faces=false&border_color&stream=false&header=true&appId=283499041689204"></iframe> and this is the "Like button" iframe code: <iframe frameborder="0" scrolling="no" style="border:none; overflow:hidden; width:203px; height:21px;" src="//www.facebook.com/plugins/like.php?href&amp;send=false&amp;layout=button_count&amp;width=203&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=21&amp;appId=283499041689204"></iframe> The behaviour is the same for admin and non-admin visitors and for any browser. I created application with the same name as FB page with appId 283499041689204. Web page is XHTML transitional valid, and it contains no errors according FB debugger/linter. Formely there was age restriction (17+), but I removed it and for the moment it is accessible for anyone (13+). URL of web page: http://provocateur.eu/ URL of FB page: in the first error message Any help appriciated. Thanks in advance.

    Read the article

< Previous Page | 4 5 6 7 8 9  | Next Page >