TRENDING NEWS

POPULAR NEWS

How Do I Set Certain Html Elements Visible Only To Logged In Users On My Website In Html

How do you force users to login on a login page in order to use html/asp/php pages?

I have created an html login page that if the user types in the correct password and user name he/she gets redirected to another page whcih is an .asp page.

But currently nothing stops the user to go to the .asp page directly. So the user can type in the correct url and go to the .asp page and skip the login page. I don't want users to skip the login page and force them to use it in order to use the .asp file.

I am not sure how to go about it. Can i maybe get any advice or examples?

How do I block inspect element on my website?

It is not really possible to completely block inspect element on your website.But you can block some popular ways of accessing it. some of them includeUse of F12 key on the browser:This can be blocked using javascript key event listener. Use the below script to do accomplish it.$(document).keydown(function(e){
if(e.which === 123){

return false;

}

});
2. Use of Right clickYou can block this using javascript or with just your html

or$(document).bind("contextmenu",function(e) {
e.preventDefault();

});
3. Use of other shortcuts involving Ctrl keys
Your body content

4. By temporarily removing DOM when inspector is openedWhat the below snippet does is to detect when the debugger is opened, and removes the code and stores the code in a variable and and when the debugger is closed, it returns it.var currentHtmlContent;

var element = new Image();

var elementWithHiddenContent = document.querySelector("#element-to-hide");

var innerHtml = elementWithHiddenContent.innerHTML;



element.__defineGetter__("id", function() {

currentHtmlContent= "";

});



setInterval(function() {

currentHtmlContent= innerHtml;

console.log(element);

console.clear();

elementWithHiddenContent.innerHTML = currentHtmlContent;

}, 1000);

copied from Jonas.
Here #element-to-hide is the id of element you want to hide
and some other ways I wish I could discuss here.#wiki

Does 'inspect element' show the code for the entire website?

I assume you are using the various developer tools in chrome or safari when you open it via inspect element. What you can see there is just the front end code for that page, which will include the html, some javascript, and css. Often the CSS and Javascript are minified, so they are only 1 file. In that case, they will usually apply to the other pages as well. Much of the code probably uses frameworks such as Bootstrap in CSS, so they are not all coded from scratch.What you don't see, and what can be somewhat challenging at times, are the backend things like PHP which often generate the HTML dynamically, CGI code connecting to server side processes, and database handlers. Again, probably most of this uses frameworks and API's, but there is also a fair bit of customization even to create something as simple as a customized Wordpress template. What makes them challenging is that you can't find the files and code generating the front end code just using the web inspector or viewing the source. Generally you need to open the files on the server and trace their imports until you find what you're looking for. And you can't do this if you don't have authourized access to the files.A hundred thousand lines of code accross many files can seem daunting, but just like familiarity with anything, after awhile you get really fast at skimmimg. I also find the old school tools very useful, like multifile searches with grep.

How do I link a submit button to another webpage using HTML?

Inside Form tag specify action attribute the value should be next hrml page name.For example :

In this case when i press submit button it will go to book.html page.

If anyone online can view a page's HTML source code, then isn't it easy to steal someone's code? How are web developers or website designers able to protect the code for the websites they design?

you can copy all the "visible side" of the web site by a simple "ctrl+u" and understand how the front end is done by following all the links (.js and .css) and read it.As a full stack developer I do that to understand how websites with interesting features work and do stuff.You can even change the behaviour of the website by hitting F12 and play around with code (css, javascript, html).That's a great of LEARNING new technologies, techniques and understand how front end works.This technique works just fine with "simple" websites, one page web sites but not with more complex ones that have server side code.You can copy the front side and that's a great way to understand and learn new things but major web sites have their main/major and interesting code server side not front side.I develop Bootstrap, HTML5 and wordpress websites, templates and plugins.I'm I afraid that "pirates" will "steal" my code ? absolutely not.sharing is caring.let them copy, steal, copycat as they please.People know you're the first to create that website so they will come back to you and your site.You're not static, you improve your skills every day, the website you've created today is not as perfect and evolved as the next one.So don't worry about "copyright" and move on, copycat major websites on your desktop in order to understand how they do their visual stuff and then do something better.Even on templates and code marketplaces, buyers don't buy just plain HTML websites and want more complex, dynamic, responsive web sites so even if, let's say, I copycat the front end and visual effect of your templates, I'll, always, miss the real code that does everything because it's on a server side.Share your code and you'll become an authority in the field and people will thank you for letting them download and understand your code and learn new stuff.Afraid of people stealing your code? don't publish it :)

How is it possible for any government to “control” or censor the Web?

Since traffic from a countries ISP's can be physically routed through facilities operated by a government before they are dumped onto the 'Net, those facilities can be manipulated by the technicians there.
Example: recently a Trusted Root Authority was hacked, and over 500 fake Certificates were issued.
Iran obtained several of those, and after installing them on their servers, were able to mimic SSL connections so that Iranian citizens browsers were tricked into accepting the Certificates, and the traffic was intercepted at the border servers> decrypted> re-encrypted.
This decryption was no doubt logged, and clandestine (and as yet unknown) action was taken against dissidents.
This is known as a 'man in the middle' attack.
See: Iranian Internet users were victim to spying: report; http://news.yahoo.com/iranian-internet-users-were-victim-spying-report-001625425.html

How can I change the text contents of a webpage permanently? (visible only for me)

The Answer is "No", you can't change the text of a webpage (neither temporarily nor permanently) until/unless you have the access to their servers.After changing the text through inspect element, save the page to your desktop or any other directory (You may also save it on some free web hosting space). Then open the page from that location. Now, you are free to do anything with pageStep 1: Go to the page you want to make change inStep 2: Make the change using "Inspect Element".Step 3: Right Click on the page and save it on any location in your computer.Step 4: Now you have to upload it in a web hosting site ,i prefer u to use www.000webhost.com or else www.my3gb.com.Step 5: I prefer u to use 000webhost because it will be easy to use.Step 6: You have to make a account in that ,after that it looks like a picture given below.Step 7: Now go control pannel,then on file manager. After that a new window will pop up.Now go to public_html.Step 8: Delete the file named default.php,after that upload your page there. Copy the link of your page and you are done!

TRENDING NEWS