Include virtual.

Hello..

is there any way that i can use the include virtual statement

client.println(F(" <!--#include virtual='http://mysite/file1.html'--> "));

i want to include the contents of an external file in order to save some memory

I don't see a problem. That would be a web browser function to retrieve that file.

unfortunately there is :roll_eyes: , it cannot be recognized as a command because is a server side.

That is a problem. I thought about it for a minute, and noticed the "<!--". That normally indicates sever side scripting include. You can't do that directly.

But i think you got the message for what i am trying to do.. any other way to parse data from external file?

gc9n:
But i think you got the message for what i am trying to do.. any other way to parse data from external file?

I know exactly what you are trying to do. Since the Arduino is limited by memory size, the trick is getting the client (web browser) to do the work for you. I use frames, and that can be used to make the web browser insert "web pages" into that frame on your page. You can use that to insert images into your page also.

hmm.. that might work , i have to learn know how to pass data between iframes.

gc9n:
hmm.. that might work , i have to learn know how to pass data between iframes.

If you can't do it by inserting the correct url request into that frame, then JavaScript is your friend! :wink:

thanks man! i will use jquery

If you are going to all that, it may be best to have a url on your server that puts the Arduino "webpage" in a frame.

what do you mean?

I mean put a webpage on your server that has a frame that loads the Arduino webpage into it. I use this instead of using a meta refresh or anything else that depends on the webpage loading. I use a JavaScript routine in another frame to update the Arduino page at a specified interval. If the Arduino page fails to load just once, the other methods of updating the page fail, but the JavaScript frame reload continues to function.