Creating an html instead of rendering the page on the client side

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating an html instead of rendering the page on the client side

abergel
Hello!

Some times ago I made my webpage in Amber (http://bergel.eu).
Although I am satisfied with the result, I am starting to feel its limitations: google does not index its content, and all the .js takes time to download, especially when you are in a different hemisphere.

I am now wondering whether there is a way to generate pure html instead of having the .js executed?

The starting point of the webpage is this method:
=-=-=-==-=-=-==-=-=-=
begin
        "Starting point of the webpage"

        MainPage new appendToJQuery: 'body' asJQuery
=-=-=-==-=-=-==-=-=-=

MainPage is a subclass of Widget. Maybe I can simply write in a file instead. However, is there a FileStream or something?

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Creating an html instead of rendering the page on the client side

Herby Vojčík
Hello!

It is not clear to me, in which point of the lifecycle do you want to create HTML / whether it is static or dynamic. You can always save the source created from browser's development tool (in Chrome, Shift+Ctrl+J, Console, eval `$('html').html()` and copy to clipboard). In server, you can render the full page in phantomjs and grab it afterwards... but maybe you want something else?

Herby

Alexandre Bergel wrote:

> Hello!
>
> Some times ago I made my webpage in Amber (http://bergel.eu).
> Although I am satisfied with the result, I am starting to feel its limitations: google does not index its content, and all the .js takes time to download, especially when you are in a different hemisphere.
>
> I am now wondering whether there is a way to generate pure html instead of having the .js executed?
>
> The starting point of the webpage is this method:
> =-=-=-==-=-=-==-=-=-=
> begin
> "Starting point of the webpage"
>
> MainPage new appendToJQuery: 'body' asJQuery
> =-=-=
-==-=-=-==-=-=-=
>
> MainPage is a subclass of Widget. Maybe I can simply write in a file instead. However, is there a FileStream or something?
>
> Cheers,
> Alexandre

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Creating an html instead of rendering the page on the client side

Herby Vojčík
In reply to this post by abergel
Hello again!

I have looked at your page and it is completely empty, so you fill
everything by code. Maybe you could have the skeleton in .html itself
(pictures, links), and only filling/operating those fancy subsections
should be filled by Amber code. The page would appear in 250ms instead
of 900, then (but another time would be spent to make it filled; but
no-one would notice those 650ms, I presume).

Herby

Alexandre Bergel wrote:

> Hello!
>
> Some times ago I made my webpage in Amber (http://bergel.eu).
> Although I am satisfied with the result, I am starting to feel its limitations: google does not index its content, and all the .js takes time to download, especially when you are in a different hemisphere.
>
> I am now wondering whether there is a way to generate pure html instead of having the .js executed?
>
> The starting point of the webpage is this method:
> =-=-=-==-=-=-==-=-=-=
> begin
> "Starting point of the webpage"
>
> MainPage new appendToJQuery: 'body' asJQuery
> =-=-=-==-=-=-==-=-=-=
>
> MainPage is a subclass of Widget. Maybe I can simply write in a file instead. However, is there a FileStream or something?
>
> Cheers,
> Alexandre

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Creating an html instead of rendering the page on the client side

abergel
Hi Herby,

Thanks for your reply. When I google my name, google returns the beginning of the content of my webpage. It seems that it means that google actually executes the JavaScript when it does the indexing of the page. Anyone can confirm this? If this is the case, then maybe I do not need to produce an html at all at the end.

Cheers,
Alexandre


On Mar 6, 2013, at 11:52 AM, Herby Vojčík <[hidden email]> wrote:

> Hello again!
>
> I have looked at your page and it is completely empty, so you fill everything by code. Maybe you could have the skeleton in .html itself (pictures, links), and only filling/operating those fancy subsections should be filled by Amber code. The page would appear in 250ms instead of 900, then (but another time would be spent to make it filled; but no-one would notice those 650ms, I presume).
>
> Herby
>
> Alexandre Bergel wrote:
>> Hello!
>>
>> Some times ago I made my webpage in Amber (http://bergel.eu).
>> Although I am satisfied with the result, I am starting to feel its limitations: google does not index its content, and all the .js takes time to download, especially when you are in a different hemisphere.
>>
>> I am now wondering whether there is a way to generate pure html instead of having the .js executed?
>>
>> The starting point of the webpage is this method:
>> =-=-=-==-=-=-==-=-=-=
>> begin
>> "Starting point of the webpage"
>>
>> MainPage new appendToJQuery: 'body' asJQuery
>> =-=-=-==-=-=-==-=-=-=
>>
>> MainPage is a subclass of Widget. Maybe I can simply write in a file instead. However, is there a FileStream or something?
>>
>> Cheers,
>> Alexandre
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.