View Single Post
Old 03-19-2011, 12:09 AM  
Sexgenoten
Registered User
 
Industry Role:
Join Date: Dec 2010
Posts: 85
Quote:
Originally Posted by mvc333 View Post
What i mean is yeah if you have say 100 galleries. Each time a person clicks on one they would NORMALLY be taken to a new page... you escape that with ajax. So what I suggest is a script that creates all those individual gallery pages [gallery1.html, gallery2.html etc] and another index page that links to those static pages as opposed to loading them with ajax.
Well, the site is not really working like that except for loading a diffrent page.

What i have done is the following.

I have made a 'html template' inside the body, styled it with css and then hid it with css.
For example, a gallery layout. Its layout is in a gallery_container class, which visibility is hidden in css.

PHP is my friend. I have created a html template, which php populates the first time you load the webpage and inserts it in the main website template, just like smarty does ( but without the overhead ).

Every gallery has it own hidden input types where data is stored. ( populated by php ) and from those hidden inputs, jquery can display a selected gallery.

So when you click on a gallery to view, there is no post request send to the server; a javascript object if created an its members gather the data its need and executes some css stuff and animations.
It populates the still hidden gallery layout and after its done, the galleries layout css is turned visible.
Close, the gallery, and the layout gets hidden again. Open a new gallery, the old data gets replaced and then the gallery layout is turned visible again.... and so on.

I have no idea if it is a good practice or not. My objective was to minimize load on the server and have as much as possible done by the client computer.

I looked at "How to make Ajax links crawlable with GWT and Google App Engine" and it looks incredibily hard ( tho interesting) to me but besides that, i dont think it applies to my site as im not sending out request in that manner.

On a side note, displaying my images is done from the img src. It refers to an .php file and it returns one image at the time.

I think im going for the static versions in html.

Well, im off to bed but i'd love to talk more about this. I've gotten a few new ideas and prolly quite alot questions ;)

Last edited by Sexgenoten; 03-19-2011 at 12:12 AM.. Reason: clarification
Sexgenoten is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook