Merak performans için daha iyi olurdu. Site kaydedilir ve olmayan insanlar kişiler tarafından görülecektir. Site daha privledges var dışında kaydedilir kullanıcıları için hemen hemen aynıdır. Bu yüzden daha verimli olacağını merak ediyorum.
/ / SEÇENEK TEK
if(isLoggedIn()){
Write the whole web site plus the content the logged in user can access
}
else {
Write the whole website again, minus the content the logged in users can access.
}
//OPTION TWO
Write the website content and inset the login function wherever i need to restrict the access, so the function would be called a few different times.
Fonksiyon ilk kez kontrol edilecek ve kullanıcı ilk öbek açtıysa kullanıcı değilse, yüklenmiş olacaktır, tekrar kontrol edilmesi gerek olmaz çünkü seçeneğini kullanarak bir performans için daha iyi olurdu merak ediyorum kaydedilir, bu ilk öbek görmezden ve ikinci yığın yük olur.