Forum Discussion
Hien_Truong
Cirrus
Jan 25, 2021irule to popup the message before continue to page.
i have a below irule to popup the message window before to continue to the page. there are two issue what i don't know how to correct it. the message doesn't go away after 5 seconds to the page w...
iaine
Nacreous
Jan 28, 2021Hi
Try something like this
when RULE_INIT {
set static::refresh_time 5
set static::notification_page {
<html>
<head>
<meta http-equiv="refresh" content="$static::refresh_time;url=$original_uri" />
</head>
<body>
<br>
System Notification<br>
<br>
Bookmark the new home: http://www.abc.com/home.<br>
<br>
This message will close in $static::refresh_time seconds to continue.<br>
</body>
</html>
}
}
when HTTP_REQUEST {
if { ( [HTTP::uri] eq "/def.html") and (not [HTTP::cookie exists NotificationDone]) } {
set original_uri [HTTP::uri]
HTTP::respond 200 content [subst $static::notification_page] "Mime-Type" "text/html" "Set-Cookie" "NotificationDone=1; path=/; domain=[HTTP::host]"
} elseif { ( [HTTP::uri] eq "/xyz.html") and (not [HTTP::cookie exists NotificationDone2]) } {
set original_uri [HTTP::uri]
HTTP::respond 200 content [subst $static::notification_page] Mime-Type "text/html" "Set-Cookie" "NotificationDone2=1; path=/; domain=[HTTP::host]"
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects