i am trying to modify the website that i am getting in the iframe, and i get this error:
Uncaught DOMException: Blocked a frame with origin "http://becutan.st2" from accessing a cross-origin frame.
at contents (http://becutan.st2/js/jquery-1.11.3.js:3048:60)
at Function.map (http://becutan.st2/js/jquery-1.11.3.js:503:29).
so, maybe i can modify with css ? Is css also blocked ?
The website you're trying to display has blocked beeing displayed in an iframe.
There's nothing you can do about that, sorry.
Related
I added Flatpickr to my project which has been working perfectly fine, however when checking in mobile view I get the following error when clicking on the input to open the calendar:
Uncaught DOMException: CSSStyleSheet.cssRules getter: Not allowed to access cross-origin stylesheet
I have trawled through SO and google to try and find a solution, but nothing seems to work. I have tried the solution proposed in this thread but my project is using styled-components, which means I do not have a stylesheet to import. However I tried adding the import in my styled-component, I also tried adding a stylesheet which I imported in _app.tsx.
By playing with the responsive mode, I have noticed that the error activates when the screen width drops bellow 392px. Anything bigger than that and it all works perfectly fine.
I have opted for a temporary solution whereby on mobile I display the native inputs as opposed to the Flatpickr, as this seems to offer a better user experience.
Additionally the Flatpickr doc seems to indicate that this is what they do also, so I am thinking that this error is due to that as I was hijacking the CSS in _app.js
I have a page where I have an iframe using the following code.
<iframe name="SL" src="https://sl.se/sv/" width="100%" height="870px"></iframe>
It has been working without any problems, but yesterday it became a blank page in the iframe. I haven't updated anything in the page so it must be something in the iframe src that is blocking for some reason. Is there another way to get this page to show inside like an iframe, but with some other code?
If you see the console of your browser, it says:
Refused to display 'https://sl.se/sv/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
which means that they have disallowed loading of the resource in an iframe outside of their domain. For more information take a look at this.
I'm currently making an Iframe using javascript but when I try to access the iFrame using myIframe.contentWindow.document I receive the following error:
DOMException: Blocked a frame with origin "http://localhost:8082" from accessing a cross-origin frame.
You cannot edit the contents of an iframe for security purposes. It seems like you might be trying to set content in the iframe since the cross-origin error is being thrown. You can copy the contents of the iframe to another object then edit it.
Things to consider if this is true...
Use AJAX via jQuery.. How to copy iframe content to div?
If using Chrome, understand that Chrome does not support local CORS... Deadly CORS when http://localhost is the origin
We're having a weird problem at work that happens only in chrome. It looks like the css file is getting cached and the content of this file isn't getting re-downloaded.
The problem is that when using a fresh session for example "private session", the image "mainSprite.png" isn't getting displayed.
After some tests, I believe the problem is related to us doing redirects at the beginning if the user isn't authenticated. From what I understand, it might not complete the download of the sprites linked inside the css files. It will cache an invalid object as soon as the redirect starts and then on the following pages, it will fail to display a correct image since it cached something wrong.
The strange thing is that it actually loads the image completely at some point. But it looks like it's not refreshing it in memory...
I did a timeout of one second before starting redirects on first load and images correctly display. This is a quick fix and I can't expect every computer to load in 1 second every images contained in the css.
edit
As far as I can say, it really looks like a race condition. I changed the order of loading. We use require.js. Instead of loading js after css, I start js loading before. And images are getting loaded correctly now on my local server.
if someone is interested to look into it:
http://api.checklist.com
edit 2
When images aren't visible, opening new tabs will have the same problem. Closing the browser and reopening it will work on first load and images isn't being downloaded but loaded from Cache which means that before closing the browser, the image was indeed downloaded.
It looks like the problem coming from your redirects unfortunately i couldn't see your example ( link won't open ). Google chrome has indeed issues with caching it's annoying during development time ( clear up the cache, load new image, do the same for new image..), if you need to clear your cache try the folowing:
try to go to
chrome://chrome/settings/clearBrowserData
in your chrome browser and check the options:
Empty the Cache( i have also Clear download history and Delete cookies and other site and plug-in data )
click on 'Clear Browsing Data' button it should
All what you need to do is to trace your cash list via chrome, and from what I see is that you got this error which make it not cached:
Uncaught TypeError: Object [object Object] has no method 'placeholder'
So if you want to trace, you can use the manifest offline mode or you trace via your code.
Just following and test your page, I did catch where the error is:
file: scripts2.js Line 20 --> $('input[placeholder]').placeholder();
which you need to check the name of the place holder and change it here in this tag.
Thank you
I assume your server/backend app has routes set up. Like this Play! framework example:
# Ignore favicon requests
GET /favicon.ico 404
# Map static resources from the /app/public folder to the /public path
GET /public/ staticDir:public
# Catch all
* /{controller} {controller}.index
According your summary I suggest to set up a static folder route (where the images are) in config file or htaccess as you want, then check image url in browser url bar (with empty session). That should work!
First I would suggest that you first try to find ways to narrow the redirects. If it possible I would suggest that it would be much more advisable to try to create your content dynamically based on your users authentication using languages like PHP or ASP (just to name two).
The classic way of disabling the caching on a webpage is to set two <meta> tags inside of your <head> </head> tags. However, you should note that these are technically not "correct" as they are not part of any of the "offical" standards documentation. This also means that I would again lean towards my first suggestion of finding a better delivery system which in turn should prevent the problem.
So for "testing" purposes the tags would be:
<HEAD>
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="0">
</HEAD>
Maybe I don't understand your question or dilemma (maybe because of lack of explanation or because I can't see your page at that link since I run Chrome), but there's an example I ran across here that works in Chrome by just using Javascript/jQuery to load, instead of CSS:
http://jsfiddle.net/2Cgyg/6/
Use image at URL: http://www.w3schools.com/cssref/img_tree.gif
And although the accepted answer didn't work for me in Chrome, this is the question I got the jsFiddle above, from:
Load Image from javascript
All the caching, etc. is unnecessary, and even something you wouldn't want to do if your images are ever updated to something else - they won't appear without forcing a refresh which you can only do through altering the file name like this to avoid users not seeing your updated image:
myPic.jpg?MMDDYYYY
And you could set the date according to the date you are modifying it.
clean your browser history like cache,cookies
clean the temporary internet file
if problem not solved then reinstall browser your problem is solved definitely
I just discovered a rather peculiar issue in IE8 for a HTTPS link. Every time the page tries to access the HTTPS link, it produces an error. This happens only in IE8 and nothing else. Any idea what's going on? I found some items that said that means the files were not loaded, hence the issue and tried some fixes recommended, but they haven't worked so far. This is a .NET site by the way.
https://www.beckshoes.com/cart/cart.aspx
Message: 'Sys' is undefined
Line: 70
Char: 1
Code: 0
URI: https://www.beckshoes.com/cart/cart.aspx
Message: 'Sys' is undefined
Line: 319
Char: 1
Code: 0
URI: https://www.beckshoes.com/cart/cart.aspx
Looks to be a JavaScript error. Firefox handles it fine, but Sys is undefined in IE8 so I'm guessing that the part where it normally gets defined is missing in IE?
Use View > Source.
Is the <script src="..."> coming from the https server as well, or is it coming from http? IE8 may not be loading the script because it isn't coming from the same secure source the rest of the page is coming from. Take the <script src="..."> (if it does not include the protocol and server, use the same one the page is coming from) and paste it into the address bar of a new tab, does the script load/download?
Is the <script src="..."> tag that loads the appropriate library even listed in the source? Maybe it isn't being added because ASP.NET doesn't recognize the User Agent and doesn't think it is capable or something.
Sys is part of the Microsoft script library, and is loaded through the WebResource.axd file.
Your page seems to be mostly working in IE 8 for me - have you fixed it?
I see that you're loading the WebResource at the foot of the page - if the calls to initialise are happening before the script is loaded, then that will be what is causing it - have you deliberately moved this to the footer? The scriptmanager has a property to do this correctly: LoadScriptsBeforeUI. Setting this to false will move those scripts that can be moved down to the bottom of the page.
I notice you've also pushed the viewstate down there, so you're clearly doing som post processing of the html.
The only other thing I can think of is that looking at your page, you've got an IFrame holding the brand rotator, that is requesting it's content from http://www.beckshoes.com/brands.aspx
You really want that under https as well - that's probably not helping.