My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Would a website ever restrict js/css/images/files access based on login?

TheSheriff's photo
TheSheriff
·Oct 7, 2016

Apologies if this is a bit of daft/stupid question.

So you have a website, lets say it's amazon (as an example, I'm not saying they do this), and there's a login section. The website will only load certain css/js/files upon login authentication. Now I have a series of questions:

1. Would a website ever do this?  
2. If yes, why would a website ever do this?  
3. Is there a way around this and access files without the need for authentication. 
(without compromising the security of the reason why these files are restricted access)  

My thoughts on 3. - Such as looking at the source of the website (whilst logged in) and then open the files in the same session and copy the contents. A crude solution, but one that would work I believe.

Does anyone have any thoughts on this matter? The use case does not include restricting access to webpages but instead to the scripts loaded into said page. And this all needs to be done in JS.

Also, if anyone could point me to some google links or something that would be great :). I'm not sure what I'm googling that makes sense in a couple words so any help would be greatly received.