Why does my GitHub Pages URL return the wrong page in Chrome? - browser

I've been playing around with GitHub pages for a while, and have been doing most of my development in Firefox. Everything was working amazingly, until I attempted to test my project page in Google Chrome. To my surprise, when visiting the same GitHub project page in Firefox and Chrome, Firefox was served the correct index.html page while Chrome was served a completely different (and incorrect) one.
I've poked around for a few hours now and honestly have no idea what's going on. Both Firefox and Chrome are requesting the exact same URL with an HTTP GET request and receive different responses from the server. I've tried changed the user agent and messing with the request header in both browsers, and it didn't seem to affect anything.
Does anybody have a clue what's going on? If it helps, the project page in question is "https://wgxli.github.io/complex-function-plotter/". Any help is much appreciated.
Edit: It appears to be related to a browser cache issue. The behavior disappears if I clear all data from the browser and visit the above page. However, if I clear the browsing data, visit the root directory of the above page, and then request the above page, the problem reproduces itself. At this point, I think I've reduced it to a question of why the browser (or CDN) is returning a cache hit when it shouldn't.

I ended up fixing the issue. I was using create-react-app, which automatically registers a service worker for local caching. I just disabled this service, which resolved the problem.

Related

Chrome doesn't load webapp on NodeJS

After yet another reboot of my macbook, chrome stopped loading my webapp.
It returns literally nothing in browser window and the only thing i managed to find is that requests in chrome's timeline has status "cancelled".
If I'm trying to get there from another website (by changin url and hitting "return" button), it also does nothing, it doesn't even try to reload page.
Other browsers load it fine atm.
I've received this report from a user about couple of weeks ago, but now i've got it myself, so I assume the problem is in my server.
Recently, i've found that my android phone also can't access the website from chrome browser. The behaviour is the same. However, android default browser has access.
What could that be? Where should i look?
I'd provide more information, but there is no error codes or messages of any kind, so i have no idea what information could help in this question.
Also, i have a chrom browser extension (similar to Pocket), which also is unable to access server. The notable difference is that extension uses Socket.io only.
There were no recent code changes on server side except letsencrypt certificate renewal.
I've tried this:
server restart
different ip/locations (vpn and public access points)
chrome data cleanup / chrome version degrade / chrome reinstallation / chrome canary installation
tried to open server address directly - no difference

Google links opens wrong pages

Our website has been recently hacked (Joomla 1.5, hosted on VPS). Attacker added few php scripts that were redirecting to some ad sites. We have cleaned everything (or at least we think we did), and now everything works as it should.
However, links on Google (or Yahoo) that are pointing to our web site are still trying to include these php scripts (and returns 404 as these are deleted now). Direct links from browser works as they should.
We have cleaned site 10 days ago, so I do not think that something is cached at Google servers. Re-indexing should be done by now.
To reproduce this behavior:
Go to www.google.com
type in "anitex socks"
click any php link that starts with "anitexsocks.com"
You will get "The requested URL /wp-includes/client.php was not found on this server" + 404 error
Refresh page and everything works without issues
Why are only Google links making troubles?
Any help is welcome. Thanks!
As for the reason why this is happening, I installed a firefox add-on which blocks my browser's Referrer Header and then followed a Google link to your site and it worked fine. Then I disabled the add-on and the problem started occurring again.
This shows that there is still some malicious code running on your website which is checking all http requests to see if they come from Google (based on checking the HTTP Referrer header) and redirecting them to /wp-includes/client.php if they do,
To try to determine where this code may lie, try performing a recursive grep through all your www files on your server as well as your www configuration files,somewhere in there there must still be a reference to that client.php script, hopefully you can find and eliminate it.
That said, if it were my site and I knew a hacker had had free reign over my server to do whatever they wanted to it, I would not mess around with trying to undo the damage and would instead restore the most recent backup from before the site was hacked. You only have to miss one back door the hacker left in place and they can re-enter your site. After restoring backups, you should also upgrade/reconfigure the software they used to gain access in the first place so they can't simply rehack it in the same manner again.

Google Chrome prompts for username/password even though page doesn't request it

I previously set a directory on my web server to require a username/password during development phase. I have since removed the .htaccess file to remove the password, I have also checked the cPanel to make sure there are no settings for a user/password.
Despite this, Chrome keeps asking for a username/password. If I click Cancel, the page continues to load anyway.
This only happens on Chrome Windows and Mac. I have cleared the entire cache for Chrome but to no avail. I am not able to replicate the problem on Firefox 4 or Internet Explorer 9.
I figured it out. I was silly enough to have left the URL pointing to a domain which does ask for a username/password but the domain it was pointing to was for the development site. Not sure why the other browsers didn't do the same thing but updating the base href has solved the problem.

SSL Issue only in Google Chrome

I am having an SSL issue, but it only appears to be happening in Google Chrome.
I've checked with Firefox, Safari and Internet Explorer and there fine.
Does anyone know what is wrong? I've tried it on a BLANK page and Chrome still says there is an issue. Screenshot:
If anyone can help that would be much appreciated!
I think you may be referring to content that does not belong to your domain (ex. images) and that are retrieve from another location on the internet.
Since the browser has to get them via a http:// request on the other site, it warns you that all the content does not come from your website overs the SSL connection.
Did you tried the blank page after accessing another page of your site? Or just after launching chrome?
I run into this exact problem and solved it this morning. Two things:
Clear Google Chromes's browser cache data
Make sure your app doesn't have references to external resources that is none-https
Hope this helps,
Ray.

Website renders differently on server vs locally

I'm having a very bizarre issue. I have been building a website locally on my linux box and all was well until I uploaded the site files to a place where i have some hosted space. Everything renders exactly the same except one element in my footer which i think is affecting some jquery animation i am using. I thought maybe I was missing files or hadn't uploaded the latest versions of everything, so I deleted the server directory and re-uploaded everything exactly as is from my local copy. And yet, the problem remains. I'm not sure how this is happening. Has anyone seen this before, or does anyone have an idea what could cause this? I'm baffled! Thanks everyone!!! I am attaching screen shots.
Seems to be a cache problem. Try to force a refresh with F5 or CTRL+F5.
Try clear your cache in your browser settings.
If that don't work, use Firebug (an Firefox browser addon) to check actual css at your footer. This will show the problem.
BTW: don't use spaces in your URL if you can. Don't use spaces in your filenames/folders.

Resources