Explore BrainMass

Writing a cookie - the code

Create a cookie named Mod4 that expires after 10 days. Write the necessary lines of code.

Solution Preview

Following html code will create a cookie named Mod4

<html>Creating Cookie named Mod4


window.onload=document.cookie='Mod4=My_data_to_store; expires=10; path=/'



Explanation of the code:

<html> to begin a HTML ...

Solution Summary

Give html code will create a cookie Mod4. Step by step explanation is also given for non-computer specialists.