Why isn't my html file suddenly not working? - javascript

I'm trying to work on a html file. But I'm getting this error. I'm working on windows xp. I don't know what the error means. I tried running the files on my laptop running on windows 10 and it's giving the same error. I'm attaching a screenshot.

As Adam Axad said, the postimage.org denying access to the images, since its a 403 error.
Make sure whether the postimage.org has o+x (public enter) permission and image has o+r (public read) permission.
Hope it helps :)

The 403 Forbidden error is an HTTP status code which means that accessing the page or resource you were trying to reach is absolutely forbidden for some reason.
Just replace the images to you local once or which you have access to and it will work.

Adam and Thinker answered it, but 403 means you don't have permission to access that url. As the other two said, just try putting the images elsewhere and then linking to them at their new destination.
For future reference, here is a list of all the HTTP response codes. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
These make it easier to troubleshoot various issues like the one you're facing here, and they are good to know anyways!

Related

Error code in WordPress? public_html/.htaccess: RewriteRule: bad argument line '^index\\.php$', referer:

My WordPress page was giving me WSOD, so I looked out on the internet for its solution. After inserting a line of code in the PHP file it showed Internal Server error.
I am expecting it to be functioning so I can access my wp-admin and make updates.
I suggest you check your website's or localhost's htaccess file. Maybe it got a bad line of code because your error seems to be a 500 internel server error.
Or try to disable the plugins in case one of them might be the cause of the issue.
Also if you have an error debug log file, try to access it.
And if you have the ability to contact your webhost and they offer support, you can try this as well.

wrangler dev seems to work, but wrangler publish doesn't work, gets error "Unexpected token p in JSON at position 0"

I'm trying to make a serverless API using workers, and when I run "wrangler dev" in the command line, the local server is made and I am able to go to the page without error. A json object is shown on the page which is what I think I want since it is a "GET" request.
When I run "wrangler publish" and go to the published site, it says "Unexpected token p in JSON at position 0". I've looked at many links and I cannot find how to see what is wrong. In Cloudflare, the the logs show that the GET requests go through.
Does anyone know what I can do next to try and solve this issue? Thank you!
Figured it out, there was an error when I inspect the page, and I used that in combination with console.logs and the cloudflare worker site to fix the problem

Proxy authentification required on script tag REACTJS

First time posting here so don't hesitate if you need/I forgot something. I looked everywhere and didn't find my answer (I guess I'm missing something).
My problem:
I created a REST SpringBoot application and put an index.html in resources/static to create a REACT front end (I don't want to use nodejs, maybe webpack if I really have to).
When I contact localhost:8080/ I end up on my index.html but those scripts:
<script src="https://facebook.com/react-15.2.0.js"></script>
<script src="https://facebook.com/react-dom-15.2.0.js"></script>
needed to make REACT work provoke a Proxy Authentication Required error in the console log.
I am indeed behind my company's proxy. My IDE (IntelliJ) is configured with this proxy. My JVM takes those arguments to make it work:
-Dhttp.proxyHost=myproxy -Dhttp.proxyPort=myport -Dhttp.proxyUser=myuser -Dhttp.proxyPassword=mypwd -Dhttp.proxySet=true
and the application.properties has the following line:
server.use-forwarded-headers=true
I don't know what I should configure anymore to make it work. Do you have any ideas? Thank you very much in advance!
EDIT:
Facebook is a bad example as the proxy won't let me go on this site. I have updated my src to authorized sites (tried them on my browser and they worked). Still, I have the same error: 407 Proxy Authentification Required
I found the solution:
The error is legit. This is the HTTP protocol. First I have the 407 error asking for the informations of my proxy, then those informations are sent throught a second request. Still, showing an error in the log is disturbing.

How can I get the reason for img.onerror firing?

For example, the webserver sends back a 403 forbidden and the image fails to load. I can detect the general failure through the error event, but I want to get some more information about why. The browser obviously knows, but is there a way to get it from javascript?
Workarounds may be to try and load the image via ajax or issue a HEAD request and assume the error will reoccur. Neither seem great though.
just open fire-bug or developers tools and look in net tab. there should be every request the browser made with corresponding response including all headers and response body. Find the call for your image and you should see what the server answer really is.
edit> oh sorry, now I see you need to get the info with javascript

Javascript showing up in error logs

Suddendly i started noticing strange urls in my drupal site error logs. They have url encoded javascript functions and i have no clue where they come from or how to reproduce them. Since the url doesn't exist it shows up on error logs as "Access Denied".
URL
mydomain.com/function%20(a,c)%7Bvar%20b=this.slice((c||a)+1||this.length);this.length=0%3Ea?this.length+a:a;return%20this.push.apply(this,b)}
Referral
mydomain.com/start?created=All&search=&sort_bef_combine=created%20DESC&sort_order=DESC&sort_by=created&page=1
Other example
URL
mydomain.com/function%20(a,c)%7Bvar%20b=this.slice((c||a)+1||this.length);this.length=0%3Ea?this.length+a:a;return%20this.push.apply(this,b)}
Referral
mydomain.com/some-random-url
Another function
mydomain.com/function(b)%7Bif(void%200===this%7C%7Cnull===this)throw%20new%20TypeError;var%20a=Object(this),e=a.length%3E%3E%3E0;if(0===e)return-1;var%20c=0;0%3Carguments.length&&(c=Number(arguments[1]),c!==c?c=0:0!==c&&c!==1/0&&c!==-(1/0)&&(c=(0=e)return-1;for(c=0<=c?c:r.max(e-r.abs(c),0);c
Does anyone knows why this is happening? It's not always the same function, but this one seems to be showing more often than the rest.
I've logged the user agent string of one of the offenders and they were using Firefox 25, but when i access the site using Firefox 25 nothing strange shows up in the logs.
Is it bad coding?
Some browser extension goin' crazy?
Some insight needed please. Thanks
EDIT: Whatever it was, it got fixed or they got fed up. Thanks to all intervenients for the responses.
People (or bots) are trying to exploit your website. Hope you're sanitizing your get variables.

Categories

Resources