
If you don’t know by now, all client-side scripts are available by viewing the source code with your browser.
Internet Explorer: Right-click > View Source
Firefox: Right-click > View Page Source
What’s so special about looking at a pages source? Well, the most obvious is that you can see what other developers did to get their page how they did. It’s impossible to server-side code (ASP, JSP, PHP) simply because it’s processed on the server (hence the clever name). That being said, you can still see some juicy code with your browser using the methods above.
If you like a particular color or effect that is used on a web page, do some snooping and you just might find the source you need. Sometimes developers put their JavaScript and CSS files in outside folders as opposed to putting them directly on the page. This keeps the code cleaner and easier to maintain. Check out the source of any webpage and start investigating! You might see a link to a CSS style sheet somewhere at the top of the code (usually the first 10-20 lines). The formatting for that is:
<link rel “stylesheet” href=”../blah.css” type=”text/css”>
The “../” means one level up in the directory structure. Now all you have to do is find out what directory your in on the website, go a level up and type the name of the CSS style sheet. You can also do the same thing for JavaScript. Often times the full URL for the script is in the href for the include. If your lucky, the developer may have included comments that explain what is going on.
Go on now, view source!!
view source
July 9, 2007If you don’t know by now, all client-side scripts are available by viewing the source code with your browser.
Internet Explorer: Right-click > View Source
Firefox: Right-click > View Page Source
What’s so special about looking at a pages source? Well, the most obvious is that you can see what other developers did to get their page how they did. It’s impossible to server-side code (ASP, JSP, PHP) simply because it’s processed on the server (hence the clever name). That being said, you can still see some juicy code with your browser using the methods above.
If you like a particular color or effect that is used on a web page, do some snooping and you just might find the source you need. Sometimes developers put their JavaScript and CSS files in outside folders as opposed to putting them directly on the page. This keeps the code cleaner and easier to maintain. Check out the source of any webpage and start investigating! You might see a link to a CSS style sheet somewhere at the top of the code (usually the first 10-20 lines). The formatting for that is:
<link rel “stylesheet” href=”../blah.css” type=”text/css”>
The “../” means one level up in the directory structure. Now all you have to do is find out what directory your in on the website, go a level up and type the name of the CSS style sheet. You can also do the same thing for JavaScript. Often times the full URL for the script is in the href for the include. If your lucky, the developer may have included comments that explain what is going on.
Go on now, view source!!
Posted in Insight, programming | Tagged asp, code behind, comments, css, html, javascript, jsp, php, view source | 3 Comments »