|
I never write broken HTML, large projects to easily become a mess to read. And honestly I have never had an issue with performance. But I would be interested in your article when it is ready...
I am familiar with Output Buffering, but have not used it all that much, although maybe I should.
Currently I am updating my js knowledge to the current standards of code separation...(i.e.: removing things like ...to and js adding the event logic at the end page load.).
I am also contemplating an issue of external (multiple) css file loads vs style tags with css loaded based on page need using php code logic. I suspect in projects with a large number css rules can be refined to reduce the file size (sent to the browser) by send only the needed rules without the need for a larger number of file reads (split css files). But this flies in the face of separation of style from html...and I need to test, well I first need to figure out how I could test.
All the best
cjoki
modified on Monday, October 12, 2009 5:12 PM
|
|
|
|
|
cjoki wrote: Currently I am updating my js knowledge to the current standards of code separation...(i.e.: removing things like ...to and js adding the event logic at the end page load.).
You get a thumbs up That's the kind of thing I enjoy doing. Have a look at using jQuery. jQuery could do what you want with a single line.
$(document).ready(function() {
$('#btn').click(some_function);
}); (Added new lines to make it more readable.)
cjoki wrote: I am also contemplating an issue of external (multiple) css file loads vs style tags with css loaded based on page need using php code logic. I suspect in projects with a large number css rules can be refined to reduce the file size (sent to the browser) by send only the needed rules without the need for a larger number of file reads (split css files). But this flies in the face of separation of style from html...and I need to test, well I first need to figure out how I could test.
I was playing around with this the other day.
For performance, minimizing your js files, using a tool like this[^], greatly improves page load times. The same applies for css file. Loading multiple small css files is slower than loading one big css file. There is a css compressor[^] as well.
Note: It's only worth minimizing files on release versions.
A good tool for testing page load time is the Firebug addon[^] for Firefox. It has a tab called 'NET' which shows you how long everything takes to load. It also debugs JS which is very useful and shows the DOM while JS is changing it.
Hope that helps
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
yeah, I keep forgetting about firebug's Net tab for download times, I tend to use it when debugging ajax calls. I also found a tool from yahoo, called Y!Slow that is a firebug plug-in. I have yet to play with it much but it also shows performance slow downs and offers corrective tips.
On the css, my question comes down to 1) multiple css files, 2) one big css file or 3) adding css rules to a style tag in the page by way of code logic. Your reply confirms my gut feeling about a large number of small css files (is this true if the files are only added to the servers output on the fly and as needed?), but then there is the 1 large file vs the dynamic css rules in a style tag.
With 1 large file there is no control over the css output...that I can think of. But the flow goes; page is requested by browser and then the css is request after the page download completes.
The code added to the pages style tag, can use some simple logic rules to minimize the amount of css rules added to the page, thus making it small (vs the entire css file) and would not require a secondary file request for a separate css file (the 1 large css file).
It would seam logical that the dynamic css rules added to the page will be the better performance solution. Of course I am not including compressed css files which is another performance question.
JQuery, I have avoided...no real reason, but I have. I am still hand coding JavaScript.
|
|
|
|
|
The method I've used recently is to use one big css file. The browser normally caches it, so the only real performance loss will be the first page load.
I went through a phase of having a separate specific css file for every page, and a global one included on each page. It was annoying, to say the least, worse to maintain than templates. Plus each page had to cache a separate page which slowed the load time.
I tend to cache as many things as I can as it produces quicker load times and doesn't take up as much precious bandwidth
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
good point and well taken
|
|
|
|
|
Hi
Anybody here to guide me to dual boot windows and linux mint.
|
|
|
|
|
hi, any one tell me how to install the linux os to my pc
|
|
|
|
|
thangvel wrote: any one tell me how to install the linux os to my pc
From a Linux distribution DVD.
|
|
|
|
|
Insert a Debian Bootable Installation DVD in your drive and install it .
|
|
|
|
|
It is possible to download php code from any website without log in to web server ?
|
|
|
|
|
No, PHP is a processing language that outputs html, without access to the server (or knowledge of any backup php files) you cannot obtain the php source code after it's been processed.
|
|
|
|
|
the question is very basic and simple
but im not sure how to put it
basically i have an x amount of links on a page to open up in a newtab or window
and after ALL links are clicked, i want the main page, to auto redirect to somewhere else
so basically
on this page, www.unrealart.org/first.php
after all links are clicked on thats page, i want it to redirect to
www.unrealart.org/riders.php automatically
|
|
|
|
|
You'll need to code something using the javascript onclick event - but I would let the users change their page (perhaps display a continue button after all links are clicked). Reason being: what if they clicked the final link and it failed and so they go to click it again and it's gone.
|
|
|
|
|
I'm in a lecture and I'm bored. I wrote this quick little example which should do it for you.
It assigns a hreflang attribute to each link which has been clicked.
The code uses jQuery and is self explanatory.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Example</title>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#links').children('a').click(function() {
$(this).unbind('click').attr('hreflang','en');
checkAllClicked();
});
});
var allClicked = false;
function checkAllClicked()
{
allClicked = true;
$('#links').children('a').each(function()
{
if (typeof $(this).attr('hreflang') == 'undefined')
{
allClicked = false;
}
});
if (allClicked)
{
window.location = 'redirectedto.html';
}
}
</script>
</head>
<body>
<div id="links">
<a href="target.html" target="_blank" title="New Window">1</a>
<a href="target.html" target="_blank" title="New Window">2</a>
<a href="target.html" target="_blank" title="New Window">3</a>
<a href="target.html" target="_blank" title="New Window">4</a>
</div>
</body>
</html>
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Is it possible to fetch stock data from nseindia Like "http://nseindia.com/marketinfo/equities/cmquote.jsp?key=BHARTIARTLEQN&symbol=BHARTIARTL&flag=0" using php. I was able do it before but not now after nseindia done some changes in its site.Is it still possible to get data ?
|
|
|
|
|
|
I used it before i ask this question but it is not doing what i want it is showing label but not showing price like "last price "
|
|
|
|
|
Hey, i was wondering where i can find some decent python tutorials that i can download in the PDF format???
Your help will be greatly appreciated.
Todd.
|
|
|
|
|
Greetings:
Although you'll end up getting all of the Python documentation, including the language reference and C API, the tutorials over at Python's official site, python.org are still some of the best around: http://docs.python.org/download.html[^]
For practical applications and uses for Python, Mark Pilgrim's Dive Into Python is also a tremendous resource: http://diveintopython.org/#download[^]
I hope this was of help....
|
|
|
|
|
|
Hi
I am trying to building a site where people can post there thoughts such as twiter, face book etc.
Second, Could some one advise me when anybody fill a form online and click submit. It goes to database but I am wondering where is data base. I mean in my personal storage or where I will register my website. Can retive that data .
Finally, Could some advise me how back end process works such as once i build site, how to trasfer files , How professional web sites works as I have no idea about it .
Thanks
|
|
|
|
|
|
Looks like you have no idea about websites or at least developing a websitte
Dont worry, just get a CMS like Joomla and forget about all the hastle of developing it yourself
Alexei Rodriguez
|
|
|
|
|
Hi everybody !
I've got :
+ 1 visa card.
+ 1 site online.
+ 1 Paypal Account
How can i refered my customer to the paypal to pay money for my site when they buy my products.
Thanks and regards !
|
|
|
|
|
Theres a bunch of stuff on the paypal site for that. All the basics are there if you want to code the buttons yourself - or you can create buttons in your paypal account by logging in clicking on "profile".
|
|
|
|