Forum Discussion

Jarunam_351065's avatar
Icon for Nimbostratus rankNimbostratus
Feb 07, 2018

irule to pop-up a notification banner over a webpage.

Need an irule to pop-up a notification over a webpage with a "click here for more information" content. This can be statically hosted too or just a pop-up once every time one logs in. Any ideas?


5 Replies

  • Technically you can do this, I would look at some javascript which can be inserted into the HTML during a response, but why would you not just apply to the actual web application on the backend?


    It would be a lot less work and quicker.


  • Surgeon's avatar
    Ret. Employee

    AMG is right. That would be much easier. As alternative you can forward the traffic via icap servers. This requires some administrative work but it is very flexible solution and you can modify your webpage as much as you want without touching actual web servers


  • The following pops up a warning banner on our SharePoint site. It includes a User Agent conditional that will bypass the banner in the event the user is connecting with an MS Product containing one of the agent strings listed.

    Hope this helps.


    when RULE_INIT {    
    set static::notification_page {
                                System Notification
                                System Notification
                                Acknowledgement of the privacy and security notice is required.
                Once the notice is acknowledged, you will be redirected to your requested page. 
    when HTTP_REQUEST  {
    set ckname NotificationDone
    set ckvalue 1
    set ckdomain ".[HTTP::host]"
    set noticeMimeType "text/html"
     MS Office Application requests cannot process javascript prompts.
     Do not process for specific request for files from Office Applications.
        switch -glob -- [HTTP::header value "User-Agent"] 
        "*Microsoft Office*" - "*MS FrontPage*" - "*MSOffice*" - "*FrontPage*" - "*Microsoft Office Protocol Discovery*" - "*SOAP Toolkit*" - "*Microsoft Office InfoPath*" - "*Microsoft Office Existence Discovery*" - "*Microsoft-WebDAV-MiniRedir*"
                     Microsoft Office Application Request for specific file  
                    if { (not [HTTP::cookie exists $ckname]) } 
                        HTTP::respond 200 content [subst $static::notification_page] Mime-Type $noticeMimeType 
  • Hi Guys,

    I am looking for a banner irule for the website for example there is maintenance window for application server and the requirement is whenever user will access that website he should get a banner prompt saying that like this site is under maintenance and please call help desk.

    I appreciate if someone can suggest on this. 


    Thank you.